<!DOCTYPE html><html><head>
      <title>Bistory &#x5E2E;&#x52A9;&#x6587;&#x6863;</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css">
      
      

      
      
      
      
      
      

      <style>
      /**
 * prism.js Github theme based on GitHub's theme.
 * @author Sam Clarke
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #333;
  background: none;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.4;

  -moz-tab-size: 8;
  -o-tab-size: 8;
  tab-size: 8;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: .8em;
  overflow: auto;
  /* border: 1px solid #ddd; */
  border-radius: 3px;
  /* background: #fff; */
  background: #f5f5f5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
  background: #f5f5f5;
}

.token.comment,
.token.blockquote {
  color: #969896;
}

.token.cdata {
  color: #183691;
}

.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
  color: #333;
}

.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
  color: #a71d5d;
}

.token.string,
.token.url,
.token.regex,
.token.attr-value {
  color: #183691;
}

.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
  color: #0086b3;
}

.token.tag,
.token.selector,
.token.prolog {
  color: #63a35c;
}

.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
  color: #795da3;
}

.token.entity {
  cursor: help;
}

.token.title,
.token.title .token.punctuation {
  font-weight: bold;
  color: #1d3e81;
}

.token.list {
  color: #ed6a43;
}

.token.inserted {
  background-color: #eaffea;
  color: #55a532;
}

.token.deleted {
  background-color: #ffecec;
  color: #bd2c00;
}

.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}


/* JSON */
.language-json .token.property {
  color: #183691;
}

.language-markup .token.tag .token.punctuation {
  color: #333;
}

/* CSS */
code.language-css,
.language-css .token.function {
  color: #0086b3;
}

/* YAML */
.language-yaml .token.atrule {
  color: #63a35c;
}

code.language-yaml {
  color: #183691;
}

/* Ruby */
.language-ruby .token.function {
  color: #333;
}

/* Markdown */
.language-markdown .token.url {
  color: #795da3;
}

/* Makefile */
.language-makefile .token.symbol {
  color: #795da3;
}

.language-makefile .token.variable {
  color: #183691;
}

.language-makefile .token.builtin {
  color: #0086b3;
}

/* Bash */
.language-bash .token.keyword {
  color: #0086b3;
}

/* highlight */
pre[data-line] {
  position: relative;
  padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  display: block;
  width: 100%;
}

pre[data-line] .line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: hsla(24, 20%, 50%,.08);
  background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

pre[data-line] .line-highlight:before, 
pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  top: .4em;
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%,.4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% -  300px);padding:2em calc(50% - 457px -  150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
    </head>
    <body for="html-export">
      <div class="mume markdown-preview  ">
      <link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/header.css">
<style>.markdown-preview.markdown-preview pre[class*="language-"] {
  overflow: auto;
}
.markdown-preview.markdown-preview figure,
.markdown-preview.markdown-preview p {
  margin: 0;
}
.markdown-preview.markdown-preview blockquote {
  margin: 0;
}
html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview {
  padding: 2em !important;
  top: 45px !important;
  position: fixed;
  overflow: auto;
  height: calc(100% - 45px) !important;
}
@media screen and (min-width: 914px) {
  html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview {
    padding: 2em 5em !important;
    position: fixed;
    overflow: auto;
    top: 45px;
    height: calc(100% - 45px) !important;
  }
}
html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc {
  top: 45px !important;
  height: calc(100% - 45px) !important;
  padding: 10px 0 20px 0;
}
</style>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="application/javascript">
 $(document).ready(function () {
     $("body").prepend('<div class="col-md-12 header" id="header"></div>');
 })
</script>
<script type="text/javascript" src="js/header.js"></script>
<p><a href="../../../../api/url/redirect.do?name=debug.help.url">&#x5728;&#x7EBF;Debug&#x4F7F;&#x7528;&#x8BF4;&#x660E;</a></p>
<p><a href="../../../../api/url/redirect.do?name=monitor.help.url">&#x52A8;&#x6001;&#x76D1;&#x63A7;&#x4F7F;&#x7528;&#x8BF4;&#x660E;</a></p>
<p><a href="../../../../api/url/redirect.do?name=jstack.help.url">&#x7EBF;&#x7A0B;&#x7EA7;cpu&#x4F7F;&#x7528;&#x7387;&#x76D1;&#x63A7;&#x4F7F;&#x7528;&#x8BF4;&#x660E;</a></p>
<p><a href="../../../../api/url/redirect.do?name=jmap.help.url">&#x5806;&#x5185;&#x5B58;&#x5BF9;&#x8C61;&#x76D1;&#x63A7;&#x4F7F;&#x7528;&#x8BF4;&#x660E;</a></p>
<h1 class="mume-header" id="bistoury">Bistoury</h1>

<p><img src="https://img.shields.io/github/license/qunarcorp/bistoury" alt="license">
<img src="https://img.shields.io/github/v/release/qunarcorp/bistoury" alt="release"></p>
<h2 class="mume-header" id="bistoury%E6%98%AF%E4%BB%80%E4%B9%88">Bistoury&#x662F;&#x4EC0;&#x4E48;&#xFF1F;</h2>

<p><code>Bistoury</code> &#x662F;&#x53BB;&#x54EA;&#x513F;&#x7F51;&#x5F00;&#x6E90;&#x7684;&#x4E00;&#x4E2A;&#x5BF9;&#x5E94;&#x7528;&#x900F;&#x660E;&#xFF0C;&#x65E0;&#x4FB5;&#x5165;&#x7684;java&#x5E94;&#x7528;&#x8BCA;&#x65AD;&#x5DE5;&#x5177;&#xFF0C;&#x7528;&#x4E8E;&#x63D0;&#x5347;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x7684;&#x8BCA;&#x65AD;&#x6548;&#x7387;&#x548C;&#x80FD;&#x529B;&#x3002;</p>
<p><code>Bistoury</code> &#x7684;&#x76EE;&#x6807;&#x662F;&#x4E00;&#x7AD9;&#x5F0F;java&#x5E94;&#x7528;&#x8BCA;&#x65AD;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#xFF0C;&#x8BA9;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x65E0;&#x9700;&#x767B;&#x5F55;&#x673A;&#x5668;&#x6216;&#x4FEE;&#x6539;&#x7CFB;&#x7EDF;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x4ECE;&#x65E5;&#x5FD7;&#x3001;&#x5185;&#x5B58;&#x3001;&#x7EBF;&#x7A0B;&#x3001;&#x7C7B;&#x4FE1;&#x606F;&#x3001;&#x8C03;&#x8BD5;&#x3001;&#x673A;&#x5668;&#x548C;&#x7CFB;&#x7EDF;&#x5C5E;&#x6027;&#x7B49;&#x5404;&#x4E2A;&#x65B9;&#x9762;&#x5BF9;&#x5E94;&#x7528;&#x8FDB;&#x884C;&#x8BCA;&#x65AD;&#xFF0C;&#x63D0;&#x5347;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x8BCA;&#x65AD;&#x95EE;&#x9898;&#x7684;&#x6548;&#x7387;&#x548C;&#x80FD;&#x529B;&#x3002;</p>
<p><code>Bistoury</code> &#x5728;&#x516C;&#x53F8;&#x5185;&#x90E8;&#x539F;&#x6709;agent&#x7684;&#x57FA;&#x7840;&#x4E0A;&#x96C6;&#x6210;Alibaba&#x5F00;&#x6E90;&#x7684;<a href="https://github.com/alibaba/arthas">arthas</a>&#x548C;&#x552F;&#x54C1;&#x4F1A;&#x5F00;&#x6E90;&#x7684;<a href="https://github.com/vipshop/vjtools">vjtools</a>&#xFF0C;&#x63D0;&#x4F9B;&#x4E86;&#x66F4;&#x52A0;&#x4E30;&#x5BCC;&#x7684;&#x529F;&#x80FD;&#xFF0C;&#x611F;&#x8C22;&#x4ED6;&#x4EEC;&#x505A;&#x51FA;&#x7684;&#x4F18;&#x79C0;&#x5DE5;&#x4F5C;&#x3002;</p>
<h2 class="mume-header" id="%E7%AE%80%E4%BB%8B">&#x7B80;&#x4ECB;</h2>

<p>Arthas&#x548C;vjtools&#x5DF2;&#x7ECF;&#x662F;&#x5F88;&#x4F18;&#x79C0;&#x7684;&#x5DE5;&#x5177;&#xFF0C;&#x6211;&#x4EEC;&#x4E3A;&#x4EC0;&#x4E48;&#x8FD8;&#x8981;&#x5F00;&#x53D1;Bistoury&#xFF1F;</p>
<p>Arthas&#x548C;vjtools&#x901A;&#x8FC7;&#x547D;&#x4EE4;&#x884C;&#x6216;&#x7C7B;&#x4F3C;&#x7684;&#x65B9;&#x5F0F;&#x4F7F;&#x7528;&#xFF0C;&#x4E0D;&#x53EF;&#x5426;&#x8BA4;&#x547D;&#x4EE4;&#x884C;&#x5728;&#x5F88;&#x591A;&#x65F6;&#x5019;&#x5177;&#x6709;&#x6BD4;&#x8F83;&#x9AD8;&#x7684;&#x6548;&#x7387;&#xFF1B;&#x4F46;&#x56FE;&#x5F62;&#x5316;&#x754C;&#x9762;&#x4E5F;&#x6709;&#x5176;&#x81EA;&#x8EAB;&#x7684;&#x4F18;&#x70B9;&#xFF0C;&#x7279;&#x522B;&#x662F;&#x5728;&#x53C2;&#x6570;&#x590D;&#x6742;&#x65F6;&#x4F7F;&#x7528;&#x8D77;&#x6765;&#x66F4;&#x52A0;&#x7B80;&#x5355;&#xFF0C;&#x6548;&#x7387;&#x66F4;&#x9AD8;&#x3002;Bistoury&#x5728;&#x4FDD;&#x7559;&#x547D;&#x4EE4;&#x884C;&#x754C;&#x9762;&#x7684;&#x57FA;&#x7840;&#x4E0A;&#xFF0C;&#x8FD8;&#x5BF9;&#x5F88;&#x591A;&#x547D;&#x4EE4;&#x63D0;&#x4F9B;&#x4E86;&#x56FE;&#x5F62;&#x5316;&#x754C;&#x9762;&#xFF0C;&#x65B9;&#x9762;&#x7528;&#x6237;&#x4F7F;&#x7528;&#x3002;</p>
<p>Arthas&#x548C;vjtools&#x9488;&#x5BF9;&#x5355;&#x53F0;&#x673A;&#x5668;&#xFF0C;&#x4ECE;&#x673A;&#x5668;&#x7684;&#x7EF4;&#x5EA6;&#x5BF9;&#x7CFB;&#x7EDF;&#x8FDB;&#x884C;&#x8BCA;&#x65AD;&#xFF0C;&#x6CA1;&#x6709;&#x63D0;&#x4F9B;&#x5168;&#x5C40;&#x7684;&#x89C6;&#x89D2;&#xFF1B;&#x800C;&#x5728;&#x7EBF;&#x5E94;&#x7528;&#x5F80;&#x5F80;&#x90E8;&#x7F72;&#x5728;&#x591A;&#x53F0;&#x673A;&#x5668;&#xFF0C;Bistoury&#x53EF;&#x4EE5;&#x548C;&#x4F7F;&#x7528;&#x65B9;&#x5E94;&#x7528;&#x4E2D;&#x5FC3;&#x6574;&#x5408;&#xFF0C;&#x4ECE;&#x5E94;&#x7528;&#x7684;&#x7EF4;&#x5EA6;&#x5BF9;&#x7CFB;&#x7EDF;&#x8FDB;&#x884C;&#x8BCA;&#x65AD;&#xFF0C;&#x63D0;&#x4F9B;&#x4E86;&#x66F4;&#x591A;&#x7684;&#x53EF;&#x80FD;&#x3002;</p>
<p>Arthas&#x548C;vjtools&#x5728;&#x4F7F;&#x7528;&#x4E0A;&#xFF0C;&#x8981;&#x4E48;&#x767B;&#x5F55;&#x673A;&#x5668;&#xFF0C;&#x8981;&#x4E48;&#x9700;&#x8981;&#x4F7F;&#x7528;&#x8005;&#x63D0;&#x4F9B;&#x76F8;&#x5E94;&#x7684;ip&#x548C;&#x7AEF;&#x53E3;&#xFF1B;Bistoury&#x53BB;&#x6389;&#x5404;&#x79CD;&#x8BBE;&#x7F6E;&#xFF0C;&#x63D0;&#x4F9B;&#x7EDF;&#x4E00;&#x7684;web&#x5165;&#x53E3;&#xFF0C;&#x4ECE;&#x9875;&#x9762;&#x4E0A;&#x9009;&#x62E9;&#x5E94;&#x7528;&#x548C;&#x673A;&#x5668;&#x5373;&#x53EF;&#x4F7F;&#x7528;&#x3002;</p>
<p>&#x9664;&#x4E86;&#x8FD9;&#x4E9B;&#x9488;&#x5BF9;&#x6027;&#x4F18;&#x5316;&#xFF0C;Bistoury&#x5728;&#x4FDD;&#x7559;arthas&#x548C;vjtools&#x7684;&#x6240;&#x6709;&#x529F;&#x80FD;&#x4E4B;&#x5916;&#xFF0C;&#x8FD8;&#x63D0;&#x4F9B;&#x4E86;&#x66F4;&#x52A0;&#x4E30;&#x5BCC;&#x7684;&#x529F;&#x80FD;&#x3002;</p>
<p>Bistoury&#x7684;<a href="../../../../api/url/redirect.do?name=debug.help.url">&#x5728;&#x7EBF;debug&#x529F;&#x80FD;</a>&#x53BB;&#x6389;&#x4E86;&#x5404;&#x79CD;&#x590D;&#x6742;&#x53C2;&#x6570;&#xFF0C;&#x6A21;&#x62DF;ide&#x8C03;&#x8BD5;&#x4F53;&#x9A8C;&#xFF0C;&#x901A;&#x8FC7;web&#x754C;&#x9762;&#x63D0;&#x4F9B;&#x65AD;&#x70B9;&#x8C03;&#x8BD5;&#x7684;&#x529F;&#x80FD;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x4E0D;&#x963B;&#x585E;&#x5E94;&#x7528;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x6355;&#x83B7;&#x65AD;&#x70B9;&#x5904;&#x7684;&#x4FE1;&#x606F;&#xFF08;&#x5305;&#x62EC;&#x672C;&#x5730;&#x53D8;&#x91CF;&#x3001;&#x6210;&#x5458;&#x53D8;&#x91CF;&#x3001;&#x9759;&#x6001;&#x53D8;&#x91CF;&#x548C;&#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x6808;&#xFF09;&#x3002;</p>
<p>Bistoury&#x63D0;&#x4F9B;&#x4E86;<a href="../../../../api/url/redirect.do?name=jstack.help.url">&#x7EBF;&#x7A0B;&#x7EA7;cpu&#x4F7F;&#x7528;&#x7387;&#x76D1;&#x63A7;</a>&#xFF0C;&#x53EF;&#x4EE5;&#x76D1;&#x63A7;&#x7CFB;&#x7EDF;&#x6BCF;&#x4E2A;&#x7EBF;&#x7A0B;&#x7684;&#x5206;&#x949F;&#x7EA7;cpu&#x4F7F;&#x7528;&#x7387;&#xFF0C;&#x5E76;&#x63D0;&#x4F9B;&#x6700;&#x8FD1;&#x51E0;&#x5929;&#x7684;&#x5386;&#x53F2;&#x6570;&#x636E;&#x67E5;&#x8BE2;&#x3002;</p>
<p>Bistoury&#x53EF;&#x4EE5;<a href="../../../../api/url/redirect.do?name=monitor.help.url">&#x52A8;&#x6001;&#x5BF9;&#x65B9;&#x6CD5;&#x6DFB;&#x52A0;&#x76D1;&#x63A7;</a>&#xFF0C;&#x76D1;&#x63A7;&#x65B9;&#x6CD5;&#x7684;&#x8C03;&#x7528;&#x6B21;&#x6570;&#x3001;&#x5F02;&#x5E38;&#x6B21;&#x6570;&#x548C;&#x6267;&#x884C;&#x65F6;&#x95F4;&#xFF0C;&#x540C;&#x65F6;&#x4E5F;&#x4FDD;&#x7559;&#x6700;&#x8FD1;&#x51E0;&#x5929;&#x7684;&#x76D1;&#x63A7;&#x6570;&#x636E;&#x3002;</p>
<p>Bistoury&#x63D0;&#x4F9B;&#x4E86;&#x65E5;&#x5FD7;&#x67E5;&#x770B;&#x529F;&#x80FD;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;tail&#x3001;grep&#x7B49;&#x547D;&#x4EE4;&#x5BF9;&#x5355;&#x53F0;&#x6216;&#x540C;&#x65F6;&#x5BF9;&#x591A;&#x53F0;&#x673A;&#x5668;&#x7684;&#x65E5;&#x5FD7;&#x8FDB;&#x884C;&#x67E5;&#x770B;&#x3002;</p>
<p>Bistoury&#x63D0;&#x4F9B;&#x53EF;&#x89C6;&#x5316;&#x9875;&#x9762;&#x5B9E;&#x65F6;&#x67E5;&#x770B;&#x673A;&#x5668;&#x548C;&#x5E94;&#x7528;&#x7684;&#x5404;&#x79CD;&#x4FE1;&#x606F;&#xFF0C;&#x5305;&#x62EC;&#x4E3B;&#x673A;&#x5185;&#x5B58;&#x548C;&#x78C1;&#x76D8;&#x4F7F;&#x7528;&#x3001;cpu&#x4F7F;&#x7528;&#x7387;&#x548C;load&#x3001;&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x3001;jar&#x5305;&#x4FE1;&#x606F;&#x3001;jvm&#x4FE1;&#x606F;&#x3001;&#x5185;&#x5B58;&#x4F7F;&#x7528;&#x548C;gc&#x7B49;&#x7B49;&#x3002;</p>
<h2 class="mume-header" id="bistoury-%E8%83%BD%E5%81%9A%E4%BB%80%E4%B9%88">Bistoury &#x80FD;&#x505A;&#x4EC0;&#x4E48;&#xFF1F;</h2>

<ul>
<li>&#x67E5;&#x770B;&#x5E94;&#x7528;&#x65E5;&#x5FD7;</li>
<li>&#x67E5;&#x770B;&#x4E3B;&#x673A;&#x8FD0;&#x884C;&#x72B6;&#x6001;</li>
<li>&#x5728;&#x7EBF;debug</li>
<li>&#x52A8;&#x6001;&#x76D1;&#x63A7;</li>
<li>&#x7EBF;&#x7A0B;&#x7EA7;cpu&#x4F7F;&#x7528;&#x7387;&#x76D1;&#x63A7;</li>
<li>JVM&#x8FD0;&#x884C;&#x72B6;&#x6001;&#x76D1;&#x63A7;</li>
<li>thread dump</li>
<li>jstack</li>
<li>jmap</li>
<li>JVM&#x6570;&#x636E;&#x7D27;&#x6025;&#x6536;&#x96C6;&#xFF0C;&#x4E00;&#x952E;&#x6536;&#x96C6;jstack&#x3001;jmap&#x4EE5;&#x53CA;GC&#x65E5;&#x5FD7;&#x7B49;&#x76F8;&#x5173;&#x4FE1;&#x606F;</li>
<li>&#x80FD;&#x67E5;&#x770B;&#x8FD9;&#x4E2A;&#x7C7B;&#x4ECE;&#x54EA;&#x4E2A; jar &#x5305;&#x52A0;&#x8F7D;&#x7684;&#xFF0C;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x62A5;&#x5404;&#x79CD;&#x7C7B;&#x76F8;&#x5173;&#x7684; Exception&#x3002;</li>
<li>&#x4ECE;&#x5168;&#x5C40;&#x89C6;&#x89D2;&#x6765;&#x67E5;&#x770B;&#x7CFB;&#x7EDF;&#x7684;&#x8FD0;&#x884C;&#x72B6;&#x51B5;&#x3002;</li>
<li>&#x89C9;&#x5F97;&#x4EE3;&#x7801;&#x548C;&#x60F3;&#x7684;&#x4E0D;&#x4E00;&#x6837;&#xFF1F;&#x53CD;&#x7F16;&#x8BD1;class&#x8BD5;&#x8BD5;</li>
</ul>
<p>Bistoury&#x91C7;&#x7528;&#x547D;&#x4EE4;&#x884C;&#x4EA4;&#x4E92;&#x6A21;&#x5F0F;&#xFF0C;&#x540C;&#x65F6;&#x63D0;&#x4F9B;&#x4E30;&#x5BCC;&#x7684;&#x81EA;&#x52A8;&#x8865;&#x5168;&#x529F;&#x80FD;&#xFF0C;&#x8FDB;&#x4E00;&#x6B65;&#x65B9;&#x4FBF;&#x8FDB;&#x884C;&#x95EE;&#x9898;&#x7684;&#x5B9A;&#x4F4D;&#x548C;&#x8BCA;&#x65AD;&#x3002;</p>
<p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7; <a href="../../../..">Web Console</a> &#x4F7F;&#x7528; Bistoury</p>
<hr>
<h1 class="mume-header" id="%E5%AE%89%E8%A3%85">&#x5B89;&#x88C5;</h1>

<h2 class="mume-header" id="%E4%B8%8B%E8%BD%BD">&#x4E0B;&#x8F7D;</h2>

<p>&#x6211;&#x4EEC;&#x63A8;&#x8350;&#x4F60;&#x76F4;&#x63A5;&#x4E0B;&#x8F7D;&#x7F16;&#x8BD1;&#x597D;&#x7684;&#x6587;&#x4EF6;&#x6765;&#x8FD0;&#x884C;bistoury&#x3002;</p>
<h2 class="mume-header" id="%E5%BA%94%E7%94%A8%E6%B3%A8%E5%86%8C">&#x5E94;&#x7528;&#x6CE8;&#x518C;</h2>

<p>&#x8054;&#x7CFB;&#x7BA1;&#x7406;&#x5458;&#x5728;&#x5E94;&#x7528;&#x4E2D;&#x5FC3;&#x6CE8;&#x518C;&#x5E94;&#x7528;&#xFF0C;&#x7136;&#x540E;&#x518D;&#x7BA1;&#x7406;&#x4E2D;&#x5C06;&#x81EA;&#x5DF1;&#x7684;&#x670D;&#x52A1;&#x5668;&#x6DFB;&#x52A0;&#x5230;&#x5BF9;&#x5E94;&#x7684;&#x5E94;&#x7528;&#x4E2D;&#xFF0C;&#x5E76;&#x5728;&#x540E;&#x7EED;&#x53CA;&#x65F6;&#x7EF4;&#x62A4;&#x5E94;&#x7528;&#x3001;&#x670D;&#x52A1;&#x5668;&#x4FE1;&#x606F;
<strong>&#x6CE8;&#x610F;&#xFF1A;</strong> &#x4E00;&#x53F0;&#x4E3B;&#x673A;&#xFF08;ip&#xFF09;&#x53EA;&#x53EF;&#x7ED1;&#x5B9A;&#x5230;&#x4E00;&#x4E2A;&#x5E94;&#x7528;</p>
<h2 class="mume-header" id="%E9%85%8D%E7%BD%AE">&#x914D;&#x7F6E;</h2>

<h3 class="mume-header" id="%E5%8F%91%E5%B8%83%E4%BF%A1%E6%81%AF%E9%85%8D%E7%BD%AE">&#x53D1;&#x5E03;&#x4FE1;&#x606F;&#x914D;&#x7F6E;</h3>

<p>&#x4F60;&#x9700;&#x8981;&#x5728;&#x65E5;&#x5FD7;&#x76EE;&#x5F55;&#x4E0B;&#x521B;&#x5EFA;<span id="release_path"></span>&#x6587;&#x4EF6;&#xFF08;&#x6CE8;&#x610F;&#xFF1A;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;&#x53EF;&#x80FD;&#x662F;&#x76F8;&#x5BF9;&#x65E5;&#x5FD7;&#x76EE;&#x5F55;&#x7684;&#x76F8;&#x5BF9;&#x8DEF;&#x5F84;&#xFF0C;&#x4E5F;&#x53EF;&#x80FD;&#x662F;&#x7EDD;&#x5BF9;&#x8DEF;&#x5F84;&#xFF09;&#xFF0C;&#x5B58;&#x653E;&#x5E94;&#x7528;&#x53D1;&#x5E03;&#x4FE1;&#x606F;&#xFF0C;&#x9ED8;&#x8BA4;&#x683C;&#x5F0F;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="properties" class="language-properties"><span class="token comment">#gitlab&#x9879;&#x76EE;&#x540D;</span>
<span class="token attr-name">project</span><span class="token punctuation">=</span><span class="token attr-value">tc/bistoury</span>
<span class="token comment">#&#x9879;&#x76EE;&#x6240;&#x5C5E;module&#xFF0C;&#x6CA1;&#x6709;module&#x65F6;&#x503C;&#x4E3A;&#x82F1;&#x6587;&#x53E5;&#x53F7;[.]</span>
<span class="token attr-name">module</span><span class="token punctuation">=</span><span class="token attr-value">bistoury-ui</span>
<span class="token comment">#&#x5E94;&#x7528;&#x8FD0;&#x884C;&#x7684;&#x7248;&#x672C;&#x53F7;/&#x5206;&#x652F;/tag</span>
<span class="token attr-name">output</span><span class="token punctuation">=</span><span class="token attr-value">master</span>
</pre><h3 class="mume-header" id="jvm%E5%8F%82%E6%95%B0%E9%85%8D%E7%BD%AE">JVM&#x53C2;&#x6570;&#x914D;&#x7F6E;</h3>

<p>Agent&#x542F;&#x52A8;&#x524D;&#x9700;&#x8981;&#x5728;bin/bistoury-agent-env.sh&#x7684;JAVA_OPTS&#x8BBE;&#x7F6E;&#x4EE5;&#x4E0B;&#x53C2;&#x6570;</p>
<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x662F;&#x5426;&#x5FC5;&#x987B;</th>
<th>&#x9ED8;&#x8BA4;&#x503C;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>bistoury.store.path</td>
<td>&#x5426;</td>
<td>/home/bistoury/store</td>
<td>bistoury agent&#x6570;&#x636E;&#x5B58;&#x653E;&#x8DEF;&#x5F84;&#xFF0C;&#x5305;&#x62EC;rocksdb&#x5B58;&#x653E;&#x7684;&#x76D1;&#x63A7;&#x3001;jstack&#x53CA;jmap&#x6570;&#x636E;&#x548C;&#x53CD;&#x7F16;&#x8BD1;&#x4EE3;&#x7801;&#x4E34;&#x65F6;&#x6587;&#x4EF6;&#x7684;&#x5B58;&#x653E;</td>
</tr>
<tr>
<td>bistoury.proxy.host</td>
<td>&#x662F;</td>
<td></td>
<td>proxy&#x7684;&#x57DF;&#x540D;&#xFF0C;&#x5177;&#x4F53;&#x503C;&#x8BF7;&#x8054;&#x7CFB;&#x7BA1;&#x7406;&#x5458;&#xFF0C;agent&#x4F9D;&#x8D56;&#x8BE5;&#x503C;&#x83B7;&#x53D6;proxy&#x7684;&#x8FDE;&#x63A5;&#x914D;&#x7F6E;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td>bistoury.app.lib.class</td>
<td>&#x662F;</td>
<td></td>
<td>&#x5E94;&#x7528;&#x4F9D;&#x8D56;&#x7684;jar&#x5305;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;&#x7C7B;&#xFF08;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x516C;&#x53F8;&#x5185;&#x90E8;&#x4E2D;&#x95F4;&#x4EF6;&#x7684;jar&#x5305;&#x6216;Spring&#x76F8;&#x5173;&#x5305;&#x4E2D;&#x7684;&#x7C7B;&#xFF0C;&#x5982;org.springframework.web.servlet.DispatcherServlet&#xFF09;&#xFF0C;agent&#x901A;&#x8FC7;&#x8BE5;&#x7C7B;&#x83B7;&#x53D6;&#x52A0;&#x8F7D;&#x5E94;&#x7528;&#x7C7B;&#x7684;classloader</td>
</tr>
<tr>
<td>bistoury.pid.handler.jps.symbol.class</td>
<td>&#x5426;</td>
<td>org.apache.catalina.startup.Bootstrap</td>
<td>attach&#x7684;&#x5E94;&#x7528;&#x5165;&#x53E3;&#x7C7B;&#xFF0C;&#x7528;&#x4E8E;&#x4F7F;&#x7528;jps -l&#x547D;&#x4EE4;&#x83B7;&#x53D6;&#x5E94;&#x7528;pid</td>
</tr>
<tr>
<td>bistoury.pid.handler.jps.enable</td>
<td>&#x5426;</td>
<td>true</td>
<td>&#x662F;&#x5426;&#x6253;&#x5F00;&#x901A;&#x8FC7;jps -l&#x83B7;&#x53D6;pid&#x7684;&#x5F00;&#x5173;</td>
</tr>
<tr>
<td>bistoury.pid.handler.ps.enable</td>
<td>&#x5426;</td>
<td>true</td>
<td>&#x662F;&#x5426;&#x6253;&#x5F00;&#x901A;&#x8FC7;ps aux</td>
</tr>
<tr>
<td>bistoury.app.classes.path</td>
<td>&#x5426;</td>
<td>bistoury.app.lib.class&#x5BF9;&#x5E94;jar&#x5305;&#x76EE;&#x5F55;&#x540C;&#x7EA7;&#x7684;classes&#x76EE;&#x5F55;</td>
<td>&#x9879;&#x76EE;&#x4EE3;&#x7801;&#x7F16;&#x8BD1;&#x540E;&#x5B57;&#x8282;&#x7801;&#x5B58;&#x653E;&#x76EE;&#x5F55;&#xFF0C;&#x4E00;&#x822C;&#x60C5;&#x51B5;&#x4E0B;&#x4E3A;classes&#x76EE;&#x5F55;</td>
</tr>
<tr>
<td>bistoury.agent.workgroup.num</td>
<td>&#x5426;</td>
<td>2</td>
<td>agent netty work group &#x7EBF;&#x7A0B;&#x6570;</td>
</tr>
<tr>
<td>bistoury.agent.thread.num</td>
<td>&#x5426;</td>
<td>16</td>
<td>agent&#x6267;&#x884C;&#x547D;&#x4EE4;&#x7684;&#x7EBF;&#x7A0B;&#x6570;</td>
</tr>
</tbody>
</table>
<p>&#x8FD0;&#x884C;bin&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x811A;&#x672C;&#x8FDB;&#x884C;&#x542F;&#x52A8;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;bistoury-agent-env.sh&#x4E2D;&#x7684;JAVA_OPTS&#x91CC;&#x914D;&#x7F6E;JVM&#x76F8;&#x5173;&#x53C2;&#x6570;&#xFF0C;GC&#x76F8;&#x5173;&#x914D;&#x7F6E;&#x5DF2;&#x914D;&#x7F6E;&#xFF0C;</p>
<h2 class="mume-header" id="%E5%90%AF%E5%8A%A8bistoury-agent">&#x542F;&#x52A8;bistoury agent</h2>

<p>&#x5728;&#x542F;&#x52A8;&#x662F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;-p&#x6307;&#x5B9A;pid&#x786E;&#x5B9A;agent attach&#x7279;&#x5B9A;&#x7684;java&#x8FDB;&#x7A0B;&#xFF0C;&#x4E0D;&#x6307;&#x5B9A;&#x65F6;&#x4F1A;&#x901A;&#x8FC7;jps -l&#x548C;ps aux|grep java &#x547D;&#x4EE4;&#x53CA;proxy&#x4E2D;&#x914D;&#x7F6E;&#x7684;&#x53C2;&#x6570;&#x89E3;&#x6790;pid&#xFF0C;&#x4F18;&#x5148;&#x7EA7;&#x4F9D;&#x6B21;&#x964D;&#x4F4E;&#x3002;</p>
<p>&#x4F7F;&#x7528; <code>./bistoury-agent.sh -h</code> &#x67E5;&#x770B;&#x811A;&#x672C;&#x53C2;&#x6570;&#x4FE1;&#x606F;</p>
<ul>
<li>&#x542F;&#x52A8;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">./bistoury-agent.sh -p 100 start
./bistoury-agent.sh start
</pre><ul>
<li>&#x505C;&#x6B62;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">./bistoury-agent.sh stop
</pre><ul>
<li>&#x91CD;&#x542F;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">./bistoury-agent.sh -p 101 restart
./bistoury-agent.sh restart
</pre><hr>
<h1 class="mume-header" id="%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8">&#x5FEB;&#x901F;&#x5165;&#x95E8;</h1>

<h2 class="mume-header" id="%E5%9F%BA%E7%A1%80%E5%91%BD%E4%BB%A4">&#x57FA;&#x7840;&#x547D;&#x4EE4;</h2>

<blockquote>
<ul>
<li><a href="#ls">ls</a> &#x5217;&#x51FA;&#x6587;&#x4EF6;&#x5217;&#x8868;</li>
<li><a href="#cat">cat</a> &#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x5185;&#x5BB9;</li>
<li><a href="#pwd">pwd</a> &#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;</li>
<li><a href="#history">history</a> &#x6253;&#x5370;arthas&#x7684;&#x5386;&#x53F2;&#x547D;&#x4EE4;</li>
<li><a href="#tail">tail</a> &#x67E5;&#x770B;&#x6587;&#x4EF6;&#x5185;&#x5BB9;</li>
<li><a href="#grep">grep</a> &#x641C;&#x7D22;&#x6EE1;&#x8DB3;&#x6761;&#x4EF6;&#x7684;&#x7ED3;&#x679C;&#x3002;</li>
<li><a href="#zgrep">zgrep</a> &#x5728;&#x538B;&#x7F29;&#x6587;&#x4EF6;&#x4E2D;&#x641C;&#x7D22;&#x6EE1;&#x8DB3;&#x6761;&#x4EF6;&#x7684;&#x7ED3;&#x679C;</li>
</ul>
</blockquote>
<h2 class="mume-header" id="jvm%E7%9B%B8%E5%85%B3">jvm&#x76F8;&#x5173;</h2>

<blockquote>
<ul>
<li><a href="#dashboard">dashboard</a> &#x5F53;&#x524D;&#x7CFB;&#x7EDF;&#x7684;&#x5B9E;&#x65F6;&#x6570;&#x636E;&#x9762;&#x677F;</li>
<li><a href="#jstack">jstack</a> &#x67E5;&#x770B;&#x5F53;&#x524D; java &#x8FDB;&#x7A0B;&#x7684;&#x5806;&#x6808;&#x72B6;&#x6001;</li>
<li><a href="#jstat">jstat</a> &#x7EDF;&#x8BA1;gc&#x4FE1;&#x606F;</li>
<li><a href="#thread">thread</a> &#x67E5;&#x770B;&#x5F53;&#x524D; JVM &#x7684;&#x7EBF;&#x7A0B;&#x5806;&#x6808;&#x4FE1;&#x606F;</li>
<li><a href="#jvm">jvm</a> &#x67E5;&#x770B;&#x5F53;&#x524D; JVM &#x7684;&#x4FE1;&#x606F;</li>
<li><a href="#mbean">mbean</a> &#x67E5;&#x770B; Mbean &#x7684;&#x4FE1;&#x606F;</li>
<li><a href="#sysprop">sysprop</a> &#x67E5;&#x770B;&#x548C;&#x4FEE;&#x6539;JVM&#x7684;&#x7CFB;&#x7EDF;&#x5C5E;&#x6027;</li>
<li><a href="#sysenv">sysenv</a> &#x67E5;&#x770B;&#x5F53;&#x524D;JVM&#x7684;&#x73AF;&#x5883;&#x5C5E;&#x6027;</li>
<li><a href="#vmoption">vmoption</a> &#x67E5;&#x770B;&#xFF0C;&#x66F4;&#x65B0;VM&#x8BCA;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x53C2;&#x6570;</li>
<li><a href="#getstatic">getstatic</a> &#x67E5;&#x770B;&#x7C7B;&#x7684;&#x9759;&#x6001;&#x5C5E;&#x6027;</li>
<li><a href="#heapdump">heapdump</a> dump java heap, &#x7C7B;&#x4F3C;jmap&#x547D;&#x4EE4;&#x7684;heap dump&#x529F;&#x80FD;&#x3002;</li>
<li><a href="#logger">logger</a> &#x67E5;&#x770B;logger&#x4FE1;&#x606F;&#xFF0C;&#x66F4;&#x65B0;logger level</li>
<li><a href="#qjdump">qjdump</a> &#x7EBF;&#x4E0A;&#x7D27;&#x6025;&#x6536;&#x96C6;JVM&#x6570;&#x636E;</li>
<li><a href="#qjtop">qjtop</a>  &#x4E0D;&#x518D;&#x652F;&#x6301; qjtop &#x547D;&#x4EE4;&#xFF0C;&#x53EF;&#x5230;<a href="../../../../machine.html">&#x4E3B;&#x673A;&#x4FE1;&#x606F;</a>&#x9875;&#x9762;&#x67E5;&#x770B; JVM &#x6307;&#x6807;&#x53CA;&#x7E41;&#x5FD9;&#x7EBF;&#x7A0B;</li>
<li><a href="#qjmap">qjmap</a>  &#x4E0D;&#x518D;&#x652F;&#x6301; qjmap &#x547D;&#x4EE4;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528; <a href="#heapdump">heapdump</a> &#x547D;&#x4EE4; dump &#x5185;&#x5B58;&#x4FE1;&#x606F;</li>
<li><a href="#qjmxcli">qjmxcli</a>  &#x4E0D;&#x518D;&#x652F;&#x6301; qjmxcli &#x547D;&#x4EE4;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528; <a href="#mbean">mbean</a> &#x547D;&#x4EE4;&#x67E5;&#x770B; MBean &#x4FE1;&#x606F;&#xFF0C;&#x4F7F;&#x7528; <a href="#jstat">jstat</a> &#x547D;&#x4EE4;&#x67E5;&#x770B; GC &#x4FE1;&#x606F;</li>
</ul>
</blockquote>
<h2 class="mume-header" id="classclassloader%E7%9B%B8%E5%85%B3">class/classloader&#x76F8;&#x5173;</h2>

<blockquote>
<ul>
<li><a href="#sc">sc</a> &#x67E5;&#x770B;JVM&#x5DF2;&#x52A0;&#x8F7D;&#x7684;&#x7C7B;&#x4FE1;&#x606F;</li>
<li><a href="#sm">sm</a> &#x67E5;&#x770B;&#x5DF2;&#x52A0;&#x8F7D;&#x7C7B;&#x7684;&#x65B9;&#x6CD5;&#x4FE1;&#x606F;</li>
<li><a href="#dump">dump</a> dump&#x5DF2;&#x52A0;&#x8F7D;&#x7C7B;&#x7684;byte code&#x5230;&#x7279;&#x5B9A;&#x76EE;&#x5F55;</li>
<li><a href="#redefine">redefine</a> &#x52A0;&#x8F7D;&#x5916;&#x90E8;&#x7684;.class&#x6587;&#x4EF6;&#xFF0C;redefine&#x5230;JVM&#x91CC;</li>
<li><a href="#jad">jad</a> &#x53CD;&#x7F16;&#x8BD1;&#x6307;&#x5B9A;&#x5DF2;&#x52A0;&#x8F7D;&#x7C7B;&#x7684;&#x6E90;&#x7801;</li>
<li><a href="#mc">mc</a> &#x5185;&#x5B58;&#x7F16;&#x7ECE;&#x5668;&#xFF0C;&#x5185;&#x5B58;&#x7F16;&#x7ECE;.java&#x6587;&#x4EF6;&#x4E3A;.class&#x6587;&#x4EF6;</li>
<li><a href="#classloader">classloader</a> &#x67E5;&#x770B;classloader&#x7684;&#x7EE7;&#x627F;&#x6811;&#xFF0C;urls&#xFF0C;&#x7C7B;&#x52A0;&#x8F7D;&#x4FE1;&#x606F;&#xFF0C;&#x4F7F;&#x7528;classloader&#x53BB;getResource</li>
</ul>
</blockquote>
<h2 class="mume-header" id="monitorwatchtrace%E7%9B%B8%E5%85%B3">monitor/watch/trace&#x76F8;&#x5173;</h2>

<blockquote>
<ul>
<li><a href="#monitor">monitor</a> &#x65B9;&#x6CD5;&#x6267;&#x884C;&#x76D1;&#x63A7;</li>
<li><a href="#watch">watch</a> &#x65B9;&#x6CD5;&#x6267;&#x884C;&#x6570;&#x636E;&#x89C2;&#x6D4B;</li>
<li><a href="#trace">trace</a> &#x65B9;&#x6CD5;&#x5185;&#x90E8;&#x8C03;&#x7528;&#x8DEF;&#x5F84;&#xFF0C;&#x5E76;&#x8F93;&#x51FA;&#x65B9;&#x6CD5;&#x8DEF;&#x5F84;&#x4E0A;&#x7684;&#x6BCF;&#x4E2A;&#x8282;&#x70B9;&#x4E0A;&#x8017;&#x65F6;</li>
<li><a href="#stack">stack</a> &#x8F93;&#x51FA;&#x5F53;&#x524D;&#x65B9;&#x6CD5;&#x88AB;&#x8C03;&#x7528;&#x7684;&#x8C03;&#x7528;&#x8DEF;&#x5F84;</li>
<li><a href="#tt">tt</a> &#x65B9;&#x6CD5;&#x6267;&#x884C;&#x6570;&#x636E;&#x7684;&#x65F6;&#x7A7A;&#x96A7;&#x9053;&#xFF0C;&#x8BB0;&#x5F55;&#x4E0B;&#x6307;&#x5B9A;&#x65B9;&#x6CD5;&#x6BCF;&#x6B21;&#x8C03;&#x7528;&#x7684;&#x5165;&#x53C2;&#x548C;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;&#xFF0C;&#x5E76;&#x80FD;&#x5BF9;&#x8FD9;&#x4E9B;&#x4E0D;&#x540C;&#x7684;&#x65F6;&#x95F4;&#x4E0B;&#x8C03;&#x7528;&#x8FDB;&#x884C;&#x89C2;&#x6D4B;</li>
</ul>
</blockquote>
<h2 class="mume-header" id="options">options</h2>

<blockquote>
<p>options&#x2014;&#x2014;&#x67E5;&#x770B;&#x6216;&#x8BBE;&#x7F6E;Bistoury&#x5168;&#x5C40;&#x5F00;&#x5173;</p>
</blockquote>
<h2 class="mume-header" id="web-console">Web Console</h2>

<blockquote>
<p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7; <a href="../../../../qconsole.html">Web Console</a> &#x4F7F;&#x7528;<code>Bistoury</code></p>
</blockquote>
<h1 class="mume-header" id="%E5%91%BD%E4%BB%A4%E5%88%97%E8%A1%A8">&#x547D;&#x4EE4;&#x5217;&#x8868;</h1>

<h2 class="mume-header" id="ls">ls</h2>

<p><strong>ls&#x547D;&#x4EE4;</strong> &#x7528;&#x6765;&#x663E;&#x793A;&#x76EE;&#x6807;&#x5217;&#x8868;&#xFF0C;&#x53C2;&#x6570;&#x4E0E;linux&#x4E2D;&#x7684;&#x53C2;&#x6570;&#x4E00;&#x6837;&#x3002;</p>
<blockquote>
<p>&#x5F53;&#x9009;&#x62E9;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x65F6;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x5728;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#xFF0C;&#x5F53;&#x9009;&#x62E9;&#x591A;&#x53F0;&#x673A;&#x5668;&#x65F6;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x540C;&#x65F6;&#x5728;&#x591A;&#x53F0;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#xFF0C;&#x672A;&#x9009;&#x62E9;&#x673A;&#x5668;&#x5219;&#x5728;&#x6240;&#x6709;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E8%AF%AD%E6%B3%95">&#x8BED;&#x6CD5;</h3>

<blockquote>
<p>ls (&#x9009;&#x9879;) (&#x53C2;&#x6570;)</p>
</blockquote>
<h3 class="mume-header" id="%E9%80%89%E9%A1%B9">&#x9009;&#x9879;</h3>

<pre class="language-text">-a&#xFF1A;&#x663E;&#x793A;&#x6240;&#x6709;&#x6863;&#x6848;&#x53CA;&#x76EE;&#x5F55;&#xFF08;ls&#x5185;&#x5B9A;&#x5C06;&#x6863;&#x6848;&#x540D;&#x6216;&#x76EE;&#x5F55;&#x540D;&#x79F0;&#x4E3A;&#x201C;.&#x201D;&#x7684;&#x89C6;&#x4E3A;&#x5F71;&#x85CF;&#xFF0C;&#x4E0D;&#x4F1A;&#x5217;&#x51FA;&#xFF09;&#xFF1B;
-A&#xFF1A;&#x663E;&#x793A;&#x9664;&#x5F71;&#x85CF;&#x6587;&#x4EF6;&#x201C;.&#x201D;&#x548C;&#x201C;..&#x201D;&#x4EE5;&#x5916;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x5217;&#x8868;&#xFF1B;
-C&#xFF1A;&#x591A;&#x5217;&#x663E;&#x793A;&#x8F93;&#x51FA;&#x7ED3;&#x679C;&#x3002;&#x8FD9;&#x662F;&#x9ED8;&#x8BA4;&#x9009;&#x9879;&#xFF1B;
-l&#xFF1A;&#x4E0E;&#x201C;-C&#x201D;&#x9009;&#x9879;&#x529F;&#x80FD;&#x76F8;&#x53CD;&#xFF0C;&#x6240;&#x6709;&#x8F93;&#x51FA;&#x4FE1;&#x606F;&#x7528;&#x5355;&#x5217;&#x683C;&#x5F0F;&#x8F93;&#x51FA;&#xFF0C;&#x4E0D;&#x8F93;&#x51FA;&#x4E3A;&#x591A;&#x5217;&#xFF1B;
-F&#xFF1A;&#x5728;&#x6BCF;&#x4E2A;&#x8F93;&#x51FA;&#x9879;&#x540E;&#x8FFD;&#x52A0;&#x6587;&#x4EF6;&#x7684;&#x7C7B;&#x578B;&#x6807;&#x8BC6;&#x7B26;&#xFF0C;&#x5177;&#x4F53;&#x542B;&#x4E49;&#xFF1A;&#x201C;\*&#x201D;&#x8868;&#x793A;&#x5177;&#x6709;&#x53EF;&#x6267;&#x884C;&#x6743;&#x9650;&#x7684;&#x666E;&#x901A;&#x6587;&#x4EF6;&#xFF0C;&#x201C;/&#x201D;&#x8868;&#x793A;&#x76EE;&#x5F55;&#xFF0C;&#x201C;@&#x201D;&#x8868;&#x793A;&#x7B26;&#x53F7;&#x94FE;&#x63A5;&#xFF0C;&#x201C;|&#x201D;&#x8868;&#x793A;&#x547D;&#x4EE4;&#x7BA1;&#x9053;FIFO&#xFF0C;&#x201C;=&#x201D;&#x8868;&#x793A;sockets&#x5957;&#x63A5;&#x5B57;&#x3002;&#x5F53;&#x6587;&#x4EF6;&#x4E3A;&#x666E;&#x901A;&#x6587;&#x4EF6;&#x65F6;&#xFF0C;&#x4E0D;&#x8F93;&#x51FA;&#x4EFB;&#x4F55;&#x6807;&#x8BC6;&#x7B26;&#xFF1B;
-b&#xFF1A;&#x5C06;&#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x4E0D;&#x53EF;&#x8F93;&#x51FA;&#x7684;&#x5B57;&#x7B26;&#x4EE5;&#x53CD;&#x659C;&#x7EBF;&#x201C;&#x201D;&#x52A0;&#x5B57;&#x7B26;&#x7F16;&#x7801;&#x7684;&#x65B9;&#x5F0F;&#x8F93;&#x51FA;&#xFF1B;
-c&#xFF1A;&#x4E0E;&#x201C;-lt&#x201D;&#x9009;&#x9879;&#x8FDE;&#x7528;&#x65F6;&#xFF0C;&#x6309;&#x7167;&#x6587;&#x4EF6;&#x72B6;&#x6001;&#x65F6;&#x95F4;&#x6392;&#x5E8F;&#x8F93;&#x51FA;&#x76EE;&#x5F55;&#x5185;&#x5BB9;&#xFF0C;&#x6392;&#x5E8F;&#x7684;&#x4F9D;&#x636E;&#x662F;&#x6587;&#x4EF6;&#x7684;&#x7D22;&#x5F15;&#x8282;&#x70B9;&#x4E2D;&#x7684;ctime&#x5B57;&#x6BB5;&#x3002;&#x4E0E;&#x201C;-l&#x201D;&#x9009;&#x9879;&#x8FDE;&#x7528;&#x65F6;&#xFF0C;&#x5219;&#x6392;&#x5E8F;&#x7684;&#x4E00;&#x53E5;&#x662F;&#x6587;&#x4EF6;&#x7684;&#x72B6;&#x6001;&#x6539;&#x53D8;&#x65F6;&#x95F4;&#xFF1B;
-d&#xFF1A;&#x4EC5;&#x663E;&#x793A;&#x76EE;&#x5F55;&#x540D;&#xFF0C;&#x800C;&#x4E0D;&#x663E;&#x793A;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x5185;&#x5BB9;&#x5217;&#x8868;&#x3002;&#x663E;&#x793A;&#x7B26;&#x53F7;&#x94FE;&#x63A5;&#x6587;&#x4EF6;&#x672C;&#x8EAB;&#xFF0C;&#x800C;&#x4E0D;&#x663E;&#x793A;&#x5176;&#x6240;&#x6307;&#x5411;&#x7684;&#x76EE;&#x5F55;&#x5217;&#x8868;&#xFF1B;
-f&#xFF1A;&#x6B64;&#x53C2;&#x6570;&#x7684;&#x6548;&#x679C;&#x548C;&#x540C;&#x65F6;&#x6307;&#x5B9A;&#x201C;aU&#x201D;&#x53C2;&#x6570;&#x76F8;&#x540C;&#xFF0C;&#x5E76;&#x5173;&#x95ED;&#x201C;lst&#x201D;&#x53C2;&#x6570;&#x7684;&#x6548;&#x679C;&#xFF1B;
-i&#xFF1A;&#x663E;&#x793A;&#x6587;&#x4EF6;&#x7D22;&#x5F15;&#x8282;&#x70B9;&#x53F7;&#xFF08;inode&#xFF09;&#x3002;&#x4E00;&#x4E2A;&#x7D22;&#x5F15;&#x8282;&#x70B9;&#x4EE3;&#x8868;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#xFF1B;
--file-type&#xFF1A;&#x4E0E;&#x201C;-F&#x201D;&#x9009;&#x9879;&#x7684;&#x529F;&#x80FD;&#x76F8;&#x540C;&#xFF0C;&#x4F46;&#x662F;&#x4E0D;&#x663E;&#x793A;&#x201C;\*&#x201D;&#xFF1B;
-k&#xFF1A;&#x4EE5;KB&#xFF08;&#x5343;&#x5B57;&#x8282;&#xFF09;&#x4E3A;&#x5355;&#x4F4D;&#x663E;&#x793A;&#x6587;&#x4EF6;&#x5927;&#x5C0F;&#xFF1B;
-l&#xFF1A;&#x4EE5;&#x957F;&#x683C;&#x5F0F;&#x663E;&#x793A;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x5185;&#x5BB9;&#x5217;&#x8868;&#x3002;&#x8F93;&#x51FA;&#x7684;&#x4FE1;&#x606F;&#x4ECE;&#x5DE6;&#x5230;&#x53F3;&#x4F9D;&#x6B21;&#x5305;&#x62EC;&#x6587;&#x4EF6;&#x540D;&#xFF0C;&#x6587;&#x4EF6;&#x7C7B;&#x578B;&#x3001;&#x6743;&#x9650;&#x6A21;&#x5F0F;&#x3001;&#x786C;&#x8FDE;&#x63A5;&#x6570;&#x3001;&#x6240;&#x6709;&#x8005;&#x3001;&#x7EC4;&#x3001;&#x6587;&#x4EF6;&#x5927;&#x5C0F;&#x548C;&#x6587;&#x4EF6;&#x7684;&#x6700;&#x540E;&#x4FEE;&#x6539;&#x65F6;&#x95F4;&#x7B49;&#xFF1B;
-m&#xFF1A;&#x7528;&#x201C;,&#x201D;&#x53F7;&#x533A;&#x9694;&#x6BCF;&#x4E2A;&#x6587;&#x4EF6;&#x548C;&#x76EE;&#x5F55;&#x7684;&#x540D;&#x79F0;&#xFF1B;
-n&#xFF1A;&#x4EE5;&#x7528;&#x6237;&#x8BC6;&#x522B;&#x7801;&#x548C;&#x7FA4;&#x7EC4;&#x8BC6;&#x522B;&#x7801;&#x66FF;&#x4EE3;&#x5176;&#x540D;&#x79F0;&#xFF1B;
-r&#xFF1A;&#x4EE5;&#x6587;&#x4EF6;&#x540D;&#x53CD;&#x5E8F;&#x6392;&#x5217;&#x5E76;&#x8F93;&#x51FA;&#x76EE;&#x5F55;&#x5185;&#x5BB9;&#x5217;&#x8868;&#xFF1B;
-s&#xFF1A;&#x663E;&#x793A;&#x6587;&#x4EF6;&#x548C;&#x76EE;&#x5F55;&#x7684;&#x5927;&#x5C0F;&#xFF0C;&#x4EE5;&#x533A;&#x5757;&#x4E3A;&#x5355;&#x4F4D;&#xFF1B;
-t&#xFF1A;&#x7528;&#x6587;&#x4EF6;&#x548C;&#x76EE;&#x5F55;&#x7684;&#x66F4;&#x6539;&#x65F6;&#x95F4;&#x6392;&#x5E8F;&#xFF1B;
-L&#xFF1A;&#x5982;&#x679C;&#x9047;&#x5230;&#x6027;&#x8D28;&#x4E3A;&#x7B26;&#x53F7;&#x94FE;&#x63A5;&#x7684;&#x6587;&#x4EF6;&#x6216;&#x76EE;&#x5F55;&#xFF0C;&#x76F4;&#x63A5;&#x5217;&#x51FA;&#x8BE5;&#x94FE;&#x63A5;&#x6240;&#x6307;&#x5411;&#x7684;&#x539F;&#x59CB;&#x6587;&#x4EF6;&#x6216;&#x76EE;&#x5F55;&#xFF1B;
-R&#xFF1A;&#x9012;&#x5F52;&#x5904;&#x7406;&#xFF0C;&#x5C06;&#x6307;&#x5B9A;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x53CA;&#x5B50;&#x76EE;&#x5F55;&#x4E00;&#x5E76;&#x5904;&#x7406;&#xFF1B;
--full-time&#xFF1A;&#x5217;&#x51FA;&#x5B8C;&#x6574;&#x7684;&#x65E5;&#x671F;&#x4E0E;&#x65F6;&#x95F4;&#xFF1B;
--color[=WHEN]&#xFF1A;&#x4F7F;&#x7528;&#x4E0D;&#x540C;&#x7684;&#x989C;&#x8272;&#x9AD8;&#x4EAE;&#x663E;&#x793A;&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x3002;
</pre>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0">&#x53C2;&#x6570;</h3>

<blockquote>
<p>&#x76EE;&#x5F55;&#xFF1A;&#x6307;&#x5B9A;&#x8981;&#x663E;&#x793A;&#x5217;&#x8868;&#x7684;&#x76EE;&#x5F55;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x662F;&#x5177;&#x4F53;&#x7684;&#x6587;&#x4EF6;&#x3002;</p>
</blockquote>
<h2 class="mume-header" id="cat">cat</h2>

<p><strong>cat</strong> &#x547D;&#x4EE4;&#x8FDE;&#x63A5;&#x6587;&#x4EF6;&#x5E76;&#x6253;&#x5370;&#x5230;&#x6807;&#x51C6;&#x8F93;&#x51FA;&#x8BBE;&#x5907;&#x4E0A;&#xFF0C;cat&#x7ECF;&#x5E38;&#x7528;&#x6765;&#x663E;&#x793A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;</p>
<h3 class="mume-header" id="%E8%AF%AD%E6%B3%95-1">&#x8BED;&#x6CD5;</h3>

<blockquote>
<p>cat (&#x9009;&#x9879;) (&#x53C2;&#x6570;)</p>
</blockquote>
<h3 class="mume-header" id="%E9%80%89%E9%A1%B9-1">&#x9009;&#x9879;</h3>

<pre class="language-text">-n&#x6216;-number&#xFF1A;&#x6709;1&#x5F00;&#x59CB;&#x5BF9;&#x6240;&#x6709;&#x8F93;&#x51FA;&#x7684;&#x884C;&#x6570;&#x7F16;&#x53F7;&#xFF1B;
-b&#x6216;--number-nonblank&#xFF1A;&#x548C;-n&#x76F8;&#x4F3C;&#xFF0C;&#x53EA;&#x4E0D;&#x8FC7;&#x5BF9;&#x4E8E;&#x7A7A;&#x767D;&#x884C;&#x4E0D;&#x7F16;&#x53F7;&#xFF1B;
-s&#x6216;--squeeze-blank&#xFF1A;&#x5F53;&#x9047;&#x5230;&#x6709;&#x8FDE;&#x7EED;&#x4E24;&#x884C;&#x4EE5;&#x4E0A;&#x7684;&#x7A7A;&#x767D;&#x884C;&#xFF0C;&#x5C31;&#x4EE3;&#x6362;&#x4E3A;&#x4E00;&#x884C;&#x7684;&#x7A7A;&#x767D;&#x884C;&#xFF1B;
-A&#xFF1A;&#x663E;&#x793A;&#x4E0D;&#x53EF;&#x6253;&#x5370;&#x5B57;&#x7B26;&#xFF0C;&#x884C;&#x5C3E;&#x663E;&#x793A;&#x201C;$&#x201D;&#xFF1B;
-e&#xFF1A;&#x7B49;&#x4EF7;&#x4E8E;&quot;-vE&quot;&#x9009;&#x9879;&#xFF1B;
-t&#xFF1A;&#x7B49;&#x4EF7;&#x4E8E;&quot;-vT&quot;&#x9009;&#x9879;&#xFF1B;
</pre>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0-1">&#x53C2;&#x6570;</h3>

<blockquote>
<p>&#x6587;&#x4EF6;&#x5217;&#x8868;&#xFF1A;&#x6307;&#x5B9A;&#x8981;&#x8FDE;&#x63A5;&#x7684;&#x6587;&#x4EF6;&#x5217;&#x8868;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B">&#x5B9E;&#x4F8B;</h3>

<blockquote>
<p>cat m1 &#xFF08;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#x663E;&#x793A;&#x6587;&#x4EF6;ml&#x7684;&#x5185;&#x5BB9;&#xFF09;
cat m1 m2 &#xFF08;&#x540C;&#x65F6;&#x663E;&#x793A;&#x6587;&#x4EF6;ml&#x548C;m2&#x7684;&#x5185;&#x5BB9;&#xFF09;
cat m1 m2 &gt; file &#xFF08;&#x5C06;&#x6587;&#x4EF6;ml&#x548C;m2&#x5408;&#x5E76;&#x540E;&#x653E;&#x5165;&#x6587;&#x4EF6;file&#x4E2D;&#xFF09;</p>
</blockquote>
<h2 class="mume-header" id="pwd">pwd</h2>

<blockquote>
<p>&#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x7684;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;&#xFF0C;&#x548C;linux&#x547D;&#x4EE4;&#x7C7B;&#x4F3C;</p>
</blockquote>
<h2 class="mume-header" id="history">history</h2>

<blockquote>
<p>&#x6253;&#x5370;arthas&#x7684;&#x5386;&#x53F2;&#x547D;&#x4EE4;</p>
</blockquote>
<h2 class="mume-header" id="tail">tail</h2>

<blockquote>
<ul>
<li><strong>tail</strong>&#x547D;&#x4EE4;&#x7528;&#x4E8E;&#x8F93;&#x5165;&#x6587;&#x4EF6;&#x4E2D;&#x7684;&#x5C3E;&#x90E8;&#x5185;&#x5BB9;&#x3002;tail&#x547D;&#x4EE4;&#x9ED8;&#x8BA4;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#x663E;&#x793A;&#x6307;&#x5B9A;&#x6587;&#x4EF6;&#x7684;&#x672B;&#x5C3E;10&#x884C;&#x3002;&#x5982;&#x679C;&#x7ED9;&#x5B9A;&#x7684;&#x6587;&#x4EF6;&#x4E0D;&#x6B62;&#x4E00;&#x4E2A;&#xFF0C;&#x5219;&#x5728;&#x663E;&#x793A;&#x7684;&#x6BCF;&#x4E2A;&#x6587;&#x4EF6;&#x524D;&#x9762;&#x52A0;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x540D;&#x6807;&#x9898;&#x3002;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x6307;&#x5B9A;&#x6587;&#x4EF6;&#x6216;&#x8005;&#x6587;&#x4EF6;&#x540D;&#x4E3A;&#x201C;-&#x201D;&#xFF0C;&#x5219;&#x8BFB;&#x53D6;&#x6807;&#x51C6;&#x8F93;&#x5165;&#x3002;</li>
<li>&#x5F53;&#x9009;&#x62E9;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x65F6;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x5728;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#xFF0C;&#x5F53;&#x9009;&#x62E9;&#x591A;&#x53F0;&#x673A;&#x5668;&#x65F6;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x540C;&#x65F6;&#x5728;&#x591A;&#x53F0;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#xFF0C;&#x672A;&#x9009;&#x62E9;&#x673A;&#x5668;&#x5219;&#x5728;&#x6240;&#x6709;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#x3002;</li>
<li><strong>&#x6CE8;&#x610F;</strong>&#xFF1A;&#x5982;&#x679C;&#x8868;&#x793A;&#x5B57;&#x8282;&#x6216;&#x884C;&#x6570;&#x7684;N&#x503C;&#x4E4B;&#x524D;&#x6709;&#x4E00;&#x4E2A;&#x201D;+&#x201D;&#x53F7;&#xFF0C;&#x5219;&#x4ECE;&#x6587;&#x4EF6;&#x5F00;&#x5934;&#x7684;&#x7B2C;N&#x9879;&#x5F00;&#x59CB;&#x663E;&#x793A;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x663E;&#x793A;&#x6587;&#x4EF6;&#x7684;&#x6700;&#x540E;N&#x9879;&#x3002;N&#x503C;&#x540E;&#x9762;&#x53EF;&#x4EE5;&#x6709;&#x540E;&#x7F00;&#xFF1A;b&#x8868;&#x793A;512&#xFF0C;k&#x8868;&#x793A;1024&#xFF0C;m&#x8868;&#x793A;1 048576(1M)&#x3002;&#x3001;</li>
</ul>
</blockquote>
<h3 class="mume-header" id="%E8%AF%AD%E6%B3%95-2">&#x8BED;&#x6CD5;</h3>

<blockquote>
<p>tail(&#x9009;&#x9879;)(&#x53C2;&#x6570;)</p>
</blockquote>
<h3 class="mume-header" id="%E9%80%89%E9%A1%B9-2">&#x9009;&#x9879;</h3>

<pre class="language-text">--retry&#xFF1A;&#x5373;&#x662F;&#x5728;tail&#x547D;&#x4EE4;&#x542F;&#x52A8;&#x65F6;&#xFF0C;&#x6587;&#x4EF6;&#x4E0D;&#x53EF;&#x8BBF;&#x95EE;&#x6216;&#x8005;&#x6587;&#x4EF6;&#x7A0D;&#x540E;&#x53D8;&#x5F97;&#x4E0D;&#x53EF;&#x8BBF;&#x95EE;&#xFF0C;&#x90FD;&#x59CB;&#x7EC8;&#x5C1D;&#x8BD5;&#x6253;&#x5F00;&#x6587;&#x4EF6;&#x3002;&#x4F7F;&#x7528;&#x6B64;&#x9009;&#x9879;&#x65F6;&#x9700;&#x8981;&#x4E0E;&#x9009;&#x9879;&#x201C;&#x2014;&#x2014;follow=name&#x201D;&#x8FDE;&#x7528;&#xFF1B;
-c&lt;N&gt;&#x6216;&#x2014;&#x2014;bytes=&lt;N&gt;&#xFF1A;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x5C3E;&#x90E8;&#x7684;N&#xFF08;N&#x4E3A;&#x6574;&#x6570;&#xFF09;&#x4E2A;&#x5B57;&#x8282;&#x5185;&#x5BB9;&#xFF1B;
-f &lt;name/descriptor&gt;&#x6216;&#xFF1B;--follow&lt;nameldescript&gt;&#xFF1A;&#x663E;&#x793A;&#x6587;&#x4EF6;&#x6700;&#x65B0;&#x8FFD;&#x52A0;&#x7684;&#x5185;&#x5BB9;&#x3002;&#x201C;name&#x201D;&#x8868;&#x793A;&#x4EE5;&#x6587;&#x4EF6;&#x540D;&#x7684;&#x65B9;&#x5F0F;&#x76D1;&#x89C6;&#x6587;&#x4EF6;&#x7684;&#x53D8;&#x5316;&#x3002;&#x201C;-f&#x201D;&#x4E0E;&#x201C;-fdescriptor&#x201D;&#x7B49;&#x6548;&#xFF1B;
-F&#xFF1A;&#x4E0E;&#x9009;&#x9879;&#x201C;-follow=name&#x201D;&#x548C;&#x201C;--retry&quot;&#x8FDE;&#x7528;&#x65F6;&#x529F;&#x80FD;&#x76F8;&#x540C;&#xFF1B;
-n &lt;N&gt;&#x6216;&#x2014;&#x2014;line=&lt;N&gt;&#xFF1A;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x7684;&#x5C3E;&#x90E8;N&#xFF08;N&#x4F4D;&#x6570;&#x5B57;&#xFF09;&#x884C;&#x5185;&#x5BB9;&#x3002;
--pid=&lt;&#x8FDB;&#x7A0B;&#x53F7;&gt;&#xFF1A;&#x4E0E;&#x201C;-f&#x201D;&#x9009;&#x9879;&#x8FDE;&#x7528;&#xFF0C;&#x5F53;&#x6307;&#x5B9A;&#x7684;&#x8FDB;&#x7A0B;&#x53F7;&#x7684;&#x8FDB;&#x7A0B;&#x7EC8;&#x6B62;&#x540E;&#xFF0C;&#x81EA;&#x52A8;&#x9000;&#x51FA;tail&#x547D;&#x4EE4;&#xFF1B;
-q&#x6216;&#x2014;&#x2014;quiet&#x6216;&#x2014;&#x2014;silent&#xFF1A;&#x5F53;&#x6709;&#x591A;&#x4E2A;&#x6587;&#x4EF6;&#x53C2;&#x6570;&#x65F6;&#xFF0C;&#x4E0D;&#x8F93;&#x51FA;&#x5404;&#x4E2A;&#x6587;&#x4EF6;&#x540D;&#xFF1B;
-s&lt;&#x79D2;&#x6570;&gt;&#x6216;&#x2014;&#x2014;sleep-interal=&lt;&#x79D2;&#x6570;&gt;&#xFF1A;&#x4E0E;&#x201C;-f&#x201D;&#x9009;&#x9879;&#x8FDE;&#x7528;&#xFF0C;&#x6307;&#x5B9A;&#x76D1;&#x89C6;&#x6587;&#x4EF6;&#x53D8;&#x5316;&#x65F6;&#x95F4;&#x9694;&#x7684;&#x79D2;&#x6570;&#xFF1B;
-v&#x6216;&#x2014;&#x2014;verbose&#xFF1A;&#x5F53;&#x6709;&#x591A;&#x4E2A;&#x6587;&#x4EF6;&#x53C2;&#x6570;&#x65F6;&#xFF0C;&#x603B;&#x662F;&#x8F93;&#x51FA;&#x5404;&#x4E2A;&#x6587;&#x4EF6;&#x540D;&#xFF1B;
--help&#xFF1A;&#x663E;&#x793A;&#x6307;&#x4EE4;&#x7684;&#x5E2E;&#x52A9;&#x4FE1;&#x606F;&#xFF1B;
--version&#xFF1A;&#x663E;&#x793A;&#x6307;&#x4EE4;&#x7684;&#x7248;&#x672C;&#x4FE1;&#x606F;&#x3002;
</pre>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0-2">&#x53C2;&#x6570;</h3>

<blockquote>
<p>&#x6587;&#x4EF6;&#x5217;&#x8868;&#xFF1A;&#x6307;&#x5B9A;&#x8981;&#x663E;&#x793A;&#x5C3E;&#x90E8;&#x5185;&#x5BB9;&#x7684;&#x6587;&#x4EF6;&#x5217;&#x8868;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-1">&#x5B9E;&#x4F8B;</h3>

<blockquote>
<p>tail file &#xFF08;&#x663E;&#x793A;&#x6587;&#x4EF6;file&#x7684;&#x6700;&#x540E;10&#x884C;&#xFF09;
tail +20 file &#xFF08;&#x663E;&#x793A;&#x6587;&#x4EF6;file&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x4ECE;&#x7B2C;20&#x884C;&#x81F3;&#x6587;&#x4EF6;&#x672B;&#x5C3E;&#xFF09;
tail -c 10 file &#xFF08;&#x663E;&#x793A;&#x6587;&#x4EF6;file&#x7684;&#x6700;&#x540E;10&#x4E2A;&#x5B57;&#x7B26;&#xFF09;</p>
</blockquote>
<h2 class="mume-header" id="zgrep">zgrep</h2>

<p><strong>zgrep</strong>&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x4E0D;&#x89E3;&#x538B;&#x8FC7;&#x6EE4;&#x538B;&#x7F29;&#x6587;&#x4EF6;&#x4E2D;&#x5185;&#x5BB9;&#x3002;</p>
<blockquote>
<p>&#x5F53;&#x9009;&#x62E9;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x65F6;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x5728;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#xFF0C;&#x5F53;&#x9009;&#x62E9;&#x591A;&#x53F0;&#x673A;&#x5668;&#x65F6;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x540C;&#x65F6;&#x5728;&#x591A;&#x53F0;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#xFF0C;&#x672A;&#x9009;&#x62E9;&#x673A;&#x5668;&#x5219;&#x5728;&#x6240;&#x6709;&#x673A;&#x5668;&#x4E0A;&#x6267;&#x884C;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%B8%B8%E7%94%A8%E5%8F%82%E6%95%B0">&#x5E38;&#x7528;&#x53C2;&#x6570;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>-i</td>
<td>&#x5FFD;&#x7565;&#x5B57;&#x7B26;&#x5927;&#x5C0F;&#x5199;&#x533A;&#x522B;</td>
</tr>
<tr>
<td>-v</td>
<td>&#x663E;&#x793A;&#x793A;&#x4E0D;&#x5305;&#x542B;&#x6B63;&#x5219;&#x7684;&#x6240;&#x6709;&#x884C;</td>
</tr>
<tr>
<td>-a</td>
<td>&#x5C06;&#x6587;&#x4EF6;&#x5F53;&#x4F5C;&#x6587;&#x672C;&#x6587;&#x4EF6;&#x5904;&#x7406;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-2">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>zgrep 12  log.2018-11-05.log.gz
2018-11-05 00:00:12.021 INFO  <span class="token punctuation">[</span>-thread-1<span class="token punctuation">]</span> qunar.tc.Test ? <span class="token punctuation">[</span>?<span class="token punctuation">]</span> current message offset: 2215513824, action offset: 8079227
2018-11-05 00:01:12.027 INFO  <span class="token punctuation">[</span>-thread-1<span class="token punctuation">]</span> qunar.tc.Test ? <span class="token punctuation">[</span>?<span class="token punctuation">]</span> current message offset: 2215513824, action offset: 8079227
2018-11-05 00:02:12.033 INFO  <span class="token punctuation">[</span>-thread-1<span class="token punctuation">]</span> qunar.tc.Test ? <span class="token punctuation">[</span>?<span class="token punctuation">]</span> current message offset: 2215513824, action offset: 8079227
2018-11-05 00:03:12.039 INFO  <span class="token punctuation">[</span>-thread-1<span class="token punctuation">]</span> qunar.tc.Test ? <span class="token punctuation">[</span>?<span class="token punctuation">]</span> current message offset: 2215513824, action offset: 8079227
<span class="token punctuation">..</span>.
</pre><h2 class="mume-header" id="dashboard">dashboard</h2>

<blockquote>
<p>dashboard&#x547D;&#x4EE4;&#x7528;&#x4E8E;&#x5C55;&#x793A;&#x5F53;&#x524D;&#x7CFB;&#x7EDF;&#x7684;&#x5B9E;&#x65F6;&#x6570;&#x636E;&#x9762;&#x677F;&#xFF0C;&#x6309; ctrl+c &#x9000;&#x51FA;&#x3002;
&#x4F1A;&#x663E;&#x793A;&#x5F53;&#x524D;tomcat&#x7684;&#x5B9E;&#x65F6;&#x4FE1;&#x606F;&#xFF0C;&#x5982;HTTP&#x8BF7;&#x6C42;&#x7684;qps, rt, &#x9519;&#x8BEF;&#x6570;, &#x7EBF;&#x7A0B;&#x6C60;&#x4FE1;&#x606F;&#x7B49;&#x7B49;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-3">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>dashboard
ID     NAME                GROUP        PRIORI STATE %CPU   TIME   INTER DAEMON
155    Timer-for-arthas-da system       10     RUNNA 61     0:0    <span class="token boolean">false</span> <span class="token boolean">true</span>   
137    New I/O boss <span class="token comment">#39    main         5      RUNNA 8      0:0    false true   </span>
102    DubboResponseTimeou main         5      TIMED 4      0:11   <span class="token boolean">false</span> <span class="token boolean">true</span>   
49     Hashed wheel timer  main         5      TIMED 2      0:3    <span class="token boolean">false</span> <span class="token boolean">false</span>  
127    Hashed wheel timer  main         5      TIMED 2      0:3    <span class="token boolean">false</span> <span class="token boolean">false</span>  
31     New I/O worker <span class="token comment">#10  main         5      RUNNA 2      0:0    false true   </span>
128    New I/O worker <span class="token comment">#31  main         5      RUNNA 2      0:0    false true   </span>
19     qconfig-loader work main         5      RUNNA 2      0:0    <span class="token boolean">false</span> <span class="token boolean">true</span>   
24     Hashed wheel timer  main         5      TIMED 1      0:3    <span class="token boolean">false</span> <span class="token boolean">false</span>  
33     Hashed wheel timer  main         5      TIMED 1      0:3    <span class="token boolean">false</span> <span class="token boolean">false</span>  
Memory            used  total  max    usage     GC                                      
heap              186M  1957M  1957M  9.53%     gc.ps_scavenge.count     6   
ps_eden_space     108M  498M   498M   21.68%    gc.ps_scavenge.time<span class="token punctuation">(</span>ms<span class="token punctuation">)</span>  307                
ps_survivor_space 71M   93M    93M    76.34%    gc.ps_marksweep.count    0
ps_old_gen        5M    1365M  1365M  0.42%     gc.ps_marksweep.time<span class="token punctuation">(</span>ms<span class="token punctuation">)</span> 0                   
nonheap           66M   262M  304M    25.19%                                      
Runtime                                                                         
os.name             Linux                                                       
os.version          2.6.32-358.23.2.el6.x86_64                                                    
java.version        1.7.0_45  
</pre><p>&#x6570;&#x636E;&#x8BF4;&#x660E;</p>
<pre class="language-text">- ID: Java&#x7EA7;&#x522B;&#x7684;&#x7EBF;&#x7A0B;ID&#xFF0C;&#x6CE8;&#x610F;&#x8FD9;&#x4E2A;ID&#x4E0D;&#x80FD;&#x8DDF;jstack&#x4E2D;&#x7684;nativeID&#x4E00;&#x4E00;&#x5BF9;&#x5E94;
- NAME: &#x7EBF;&#x7A0B;&#x540D;
- GROUP: &#x7EBF;&#x7A0B;&#x7EC4;&#x540D;
- PRIORITY: &#x7EBF;&#x7A0B;&#x4F18;&#x5148;&#x7EA7;, 1~10&#x4E4B;&#x95F4;&#x7684;&#x6570;&#x5B57;&#xFF0C;&#x8D8A;&#x5927;&#x8868;&#x793A;&#x4F18;&#x5148;&#x7EA7;&#x8D8A;&#x9AD8;
- STATE: &#x7EBF;&#x7A0B;&#x7684;&#x72B6;&#x6001;
- CPU%: &#x7EBF;&#x7A0B;&#x6D88;&#x8017;&#x7684;cpu&#x5360;&#x6BD4;&#xFF0C;&#x91C7;&#x6837;100ms&#xFF0C;&#x5C06;&#x6240;&#x6709;&#x7EBF;&#x7A0B;&#x5728;&#x8FD9;100ms&#x5185;&#x7684;cpu&#x4F7F;&#x7528;&#x91CF;&#x6C42;&#x548C;&#xFF0C;&#x518D;&#x7B97;&#x51FA;&#x6BCF;&#x4E2A;&#x7EBF;&#x7A0B;&#x7684;cpu&#x4F7F;&#x7528;&#x5360;   &#x6BD4;&#x3002;
- TIME: &#x7EBF;&#x7A0B;&#x8FD0;&#x884C;&#x603B;&#x65F6;&#x95F4;&#xFF0C;&#x6570;&#x636E;&#x683C;&#x5F0F;&#x4E3A;&#x5206;&#xFF1A;&#x79D2;
- INTERRUPTED: &#x7EBF;&#x7A0B;&#x5F53;&#x524D;&#x7684;&#x4E2D;&#x65AD;&#x4F4D;&#x72B6;&#x6001;
- DAEMON: &#x662F;&#x5426;&#x662F;daemon&#x7EBF;&#x7A0B;
</pre>
<h2 class="mume-header" id="jstack">jstack</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#x5E94;&#x7528;&#x8FDB;&#x7A0B;&#x7684;&#x5806;&#x6808;&#x72B6;&#x6001;
&#x547D;&#x4EE4;&#x6267;&#x884C;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x9664;&#x4E86;&#x5728;&#x754C;&#x9762;&#x4E0A;&#x67E5;&#x770B;&#xFF0C;&#x8FD8;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x6267;&#x884C;&#x7ED3;&#x679C;&#x4E2D;&#x63D0;&#x793A;&#x7684;&#x94FE;&#x63A5;&#x8FDB;&#x884C;&#x4E0B;&#x8F7D;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-4">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>jstack
2018-11-13 16:06:58
Full thread dump Java HotSpot<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> 64-Bit Server VM <span class="token punctuation">(</span>24.45-b08 mixed mode<span class="token punctuation">)</span>:

<span class="token string">&quot;DubboSharedHandler-thread-37774&quot;</span> daemon prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f64108800 nid<span class="token operator">=</span>0x2ce8 waiting on condition <span class="token punctuation">[</span>0x00007f8ef56de000<span class="token punctuation">]</span>
   java.lang.Thread.State: TIMED_WAITING <span class="token punctuation">(</span>parking<span class="token punctuation">)</span>
	at sun.misc.Unsafe.park<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
	- parking to <span class="token function">wait</span> <span class="token keyword">for</span>  <span class="token operator">&lt;</span>0x000000078e7ad858<span class="token operator">&gt;</span> <span class="token punctuation">(</span>a java.util.concurrent.SynchronousQueue<span class="token variable">$TransferStack</span><span class="token punctuation">)</span>
	at java.util.concurrent.locks.LockSupport.parkNanos<span class="token punctuation">(</span>LockSupport.java:226<span class="token punctuation">)</span>
	at java.util.concurrent.SynchronousQueue<span class="token variable">$TransferStack</span>.awaitFulfill<span class="token punctuation">(</span>SynchronousQueue.java:460<span class="token punctuation">)</span>
	at java.util.concurrent.SynchronousQueue<span class="token variable">$TransferStack</span>.transfer<span class="token punctuation">(</span>SynchronousQueue.java:359<span class="token punctuation">)</span>
	at java.util.concurrent.SynchronousQueue.poll<span class="token punctuation">(</span>SynchronousQueue.java:942<span class="token punctuation">)</span>
	at java.util.concurrent.ThreadPoolExecutor.getTask<span class="token punctuation">(</span>ThreadPoolExecutor.java:1068<span class="token punctuation">)</span>
	at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1130<span class="token punctuation">)</span>
	at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:615<span class="token punctuation">)</span>
	at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>

<span class="token string">&quot;DubboSharedHandler-thread-37773&quot;</span> daemon prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f6439f800 nid<span class="token operator">=</span>0x2ce7 waiting on condition <span class="token punctuation">[</span>0x00007f8f68bce000<span class="token punctuation">]</span>
   java.lang.Thread.State: TIMED_WAITING <span class="token punctuation">(</span>parking<span class="token punctuation">)</span>
	at sun.misc.Unsafe.park<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
	- parking to <span class="token function">wait</span> <span class="token keyword">for</span>  <span class="token operator">&lt;</span>0x000000078e7ad858<span class="token operator">&gt;</span> <span class="token punctuation">(</span>a java.util.concurrent.SynchronousQueue<span class="token variable">$TransferStack</span><span class="token punctuation">)</span>
	at java.util.concurrent.locks.LockSupport.parkNanos<span class="token punctuation">(</span>LockSupport.java:226<span class="token punctuation">)</span>
	at java.util.concurrent.SynchronousQueue<span class="token variable">$TransferStack</span>.awaitFulfill<span class="token punctuation">(</span>SynchronousQueue.java:460<span class="token punctuation">)</span>
	at java.util.concurrent.SynchronousQueue<span class="token variable">$TransferStack</span>.transfer<span class="token punctuation">(</span>SynchronousQueue.java:359<span class="token punctuation">)</span>
	at java.util.concurrent.SynchronousQueue.poll<span class="token punctuation">(</span>SynchronousQueue.java:942<span class="token punctuation">)</span>
	at java.util.concurrent.ThreadPoolExecutor.getTask<span class="token punctuation">(</span>ThreadPoolExecutor.java:1068<span class="token punctuation">)</span>
	at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1130<span class="token punctuation">)</span>
	at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:615<span class="token punctuation">)</span>
	at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>
<span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span>
<span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span>

<span class="token string">&quot;VM Thread&quot;</span> prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f90068800 nid<span class="token operator">=</span>0x6fe6 runnable

<span class="token string">&quot;GC task thread#0 (ParallelGC)&quot;</span> prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f9001f000 nid<span class="token operator">=</span>0x6fe2 runnable

<span class="token string">&quot;GC task thread#1 (ParallelGC)&quot;</span> prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f90021000 nid<span class="token operator">=</span>0x6fe3 runnable

<span class="token string">&quot;GC task thread#2 (ParallelGC)&quot;</span> prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f90022800 nid<span class="token operator">=</span>0x6fe4 runnable

<span class="token string">&quot;GC task thread#3 (ParallelGC)&quot;</span> prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f90024800 nid<span class="token operator">=</span>0x6fe5 runnable

<span class="token string">&quot;VM Periodic Task Thread&quot;</span> prio<span class="token operator">=</span>10 tid<span class="token operator">=</span>0x00007f8f900a8000 nid<span class="token operator">=</span>0x6fed waiting on condition

JNI global references: 238
</pre><h2 class="mume-header" id="jstat">jstat</h2>

<p>&#x7EDF;&#x8BA1;gc&#x4FE1;&#x606F;
&#x76F8;&#x5F53;&#x4E8E; jstat -gcutil pid 1000 1000</p>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-5">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>jstat
  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
 37.50   0.00  25.84  64.93  31.10 2082417 29736.276  2386 1911.213 31647.489
 37.50   0.00  46.20  64.93  31.10 2082417 29736.276  2386 1911.213 31647.489
 37.50   0.00  68.09  64.93  31.10 2082417 29736.276  2386 1911.213 31647.489
 37.50   0.00  90.23  64.93  31.10 2082417 29736.276  2386 1911.213 31647.489
  0.00  75.00  11.87  64.94  31.10 2082418 29736.289  2386 1911.213 31647.502
  <span class="token punctuation">..</span>.
</pre><h2 class="mume-header" id="thread">thread</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#x5F53;&#x524D;&#x7EBF;&#x7A0B;&#x4FE1;&#x606F;&#xFF0C;&#x67E5;&#x770B;&#x7EBF;&#x7A0B;&#x7684;&#x5806;&#x6808;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>&#x7EBF;&#x7A0B;id</td>
</tr>
<tr>
<td>[n:]</td>
<td>&#x6307;&#x5B9A;&#x6700;&#x5FD9;&#x7684;&#x524D;N&#x4E2A;&#x7EBF;&#x7A0B;&#x5E76;&#x6253;&#x5370;&#x5806;&#x6808;</td>
</tr>
<tr>
<td>[b]</td>
<td>&#x627E;&#x51FA;&#x5F53;&#x524D;&#x963B;&#x585E;&#x5176;&#x4ED6;&#x7EBF;&#x7A0B;&#x7684;&#x7EBF;&#x7A0B;</td>
</tr>
<tr>
<td>[i <code>&lt;value&gt;</code>]</td>
<td>&#x6307;&#x5B9A;cpu&#x5360;&#x6BD4;&#x7EDF;&#x8BA1;&#x7684;&#x91C7;&#x6837;&#x95F4;&#x9694;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#x6BEB;&#x79D2;</td>
</tr>
</tbody>
</table>
<p>cpu&#x5360;&#x6BD4;&#x662F;&#x5982;&#x4F55;&#x7EDF;&#x8BA1;&#x51FA;&#x6765;&#x7684;&#xFF1F;</p>
<blockquote>
<p>&#x8FD9;&#x91CC;&#x7684;cpu&#x7EDF;&#x8BA1;&#x7684;&#x662F;&#xFF0C;&#x4E00;&#x6BB5;&#x91C7;&#x6837;&#x95F4;&#x9694;&#x5185;&#xFF0C;&#x5F53;&#x524D;JVM&#x91CC;&#x5404;&#x4E2A;&#x7EBF;&#x7A0B;&#x6240;&#x5360;&#x7528;&#x7684;cpu&#x65F6;&#x95F4;&#x5360;&#x603B;cpu&#x65F6;&#x95F4;&#x7684;&#x767E;&#x5206;&#x6BD4;&#x3002;&#x5176;&#x8BA1;&#x7B97;&#x65B9;&#x6CD5;&#x4E3A;&#xFF1A; &#x9996;&#x5148;&#x8FDB;&#x884C;&#x4E00;&#x6B21;&#x91C7;&#x6837;&#xFF0C;&#x83B7;&#x5F97;&#x6240;&#x6709;&#x7EBF;&#x7A0B;&#x7684;cpu&#x7684;&#x4F7F;&#x7528;&#x65F6;&#x95F4;(&#x8C03;&#x7528;&#x7684;&#x662F;java.lang.management.ThreadMXBean#getThreadCpuTime&#x8FD9;&#x4E2A;&#x63A5;&#x53E3;)&#xFF0C;&#x7136;&#x540E;&#x7761;&#x7720;&#x4E00;&#x6BB5;&#x65F6;&#x95F4;&#xFF0C;&#x9ED8;&#x8BA4;100ms&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;-i&#x53C2;&#x6570;&#x6307;&#x5B9A;&#xFF0C;&#x7136;&#x540E;&#x518D;&#x91C7;&#x6837;&#x4E00;&#x6B21;&#xFF0C;&#x6700;&#x540E;&#x5F97;&#x51FA;&#x8FD9;&#x6BB5;&#x65F6;&#x95F4;&#x5185;&#x5404;&#x4E2A;&#x7EBF;&#x7A0B;&#x6D88;&#x8017;&#x7684;cpu&#x65F6;&#x95F4;&#x60C5;&#x51B5;&#xFF0C;&#x6700;&#x540E;&#x7B97;&#x51FA;&#x767E;&#x5206;&#x6BD4;&#x3002;</p>
</blockquote>
<p><font color="red">&#x6CE8;&#x610F;</font>&#xFF1A;&#x8FD9;&#x4E2A;&#x7EDF;&#x8BA1;&#x4E5F;&#x4F1A;&#x4EA7;&#x751F;&#x4E00;&#x5B9A;&#x7684;&#x5F00;&#x9500;&#xFF08;<font color="red">JDK&#x8FD9;&#x4E2A;&#x63A5;&#x53E3;&#x672C;&#x8EAB;&#x5F00;&#x9500;&#x6BD4;&#x8F83;&#x5927;</font>&#xFF09;&#xFF0C;&#x56E0;&#x6B64;&#x4F1A;&#x770B;&#x5230;as&#x7684;&#x7EBF;&#x7A0B;&#x5360;&#x7528;&#x4E00;&#x5B9A;&#x7684;&#x767E;&#x5206;&#x6BD4;&#xFF0C;&#x4E3A;&#x4E86;&#x964D;&#x4F4E;&#x7EDF;&#x8BA1;&#x81EA;&#x8EAB;&#x7684;&#x5F00;&#x9500;&#x5E26;&#x6765;&#x7684;&#x5F71;&#x54CD;&#xFF0C;&#x53EF;&#x4EE5;&#x628A;&#x91C7;&#x6837;&#x95F4;&#x9694;&#x62C9;&#x957F;&#x4E00;&#x4E9B;&#xFF0C;&#x6BD4;&#x5982;5000&#x6BEB;&#x79D2;&#x3002;</p>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-6">&#x5B9E;&#x4F8B;</h3>

<p>1&#x3001;&#x652F;&#x6301;&#x4E00;&#x952E;&#x5C55;&#x793A;&#x5F53;&#x524D;&#x6700;&#x5FD9;&#x7684;&#x524D;N&#x4E2A;&#x7EBF;&#x7A0B;&#x5E76;&#x6253;&#x5370;&#x5806;&#x6808;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>thread -n 2
<span class="token string">&quot;as-command-execute-daemon&quot;</span> Id<span class="token operator">=</span>166 cpuUsage<span class="token operator">=</span>68% RUNNABLE
    at sun.management.ThreadImpl.dumpThreads0<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
    at sun.management.ThreadImpl.getThreadInfo<span class="token punctuation">(</span>ThreadImpl.java:440<span class="token punctuation">)</span>
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads<span class="token punctuation">(</span>ThreadCommand.java:133<span class="token punctuation">)</span>
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process<span class="token punctuation">(</span>ThreadCommand.java:79<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process<span class="token punctuation">(</span>AnnotatedCommandImpl.java:82<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access<span class="token variable">$100</span><span class="token punctuation">(</span>AnnotatedCommandImpl.java:18<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl<span class="token variable">$ProcessHandler</span>.handle<span class="token punctuation">(</span>AnnotatedCommandImpl.java:111<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl<span class="token variable">$ProcessHandler</span>.handle<span class="token punctuation">(</span>AnnotatedCommandImpl.java:108<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.system.impl.ProcessImpl<span class="token variable">$CommandProcessTask</span>.run<span class="token punctuation">(</span>ProcessImpl.java:370<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1145<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:615<span class="token punctuation">)</span>
    at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>

    Number of locked synchronizers <span class="token operator">=</span> 1
    - java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker@597d9745</span>


<span class="token string">&quot;DubboResponseTimeoutScanTimer&quot;</span> Id<span class="token operator">=</span>102 cpuUsage<span class="token operator">=</span>6% TIMED_WAITING
    at java.lang.Thread.sleep<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
    at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture<span class="token variable">$RemotingInvocationTimeoutScan</span>.run<span class="token punctuation">(</span>DefaultFuture.java:315<span class="token punctuation">)</span>
    at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>


Affect<span class="token punctuation">(</span>row-cnt:0<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 166 ms.
</pre><p>2&#x3001;&#x5F53;&#x6CA1;&#x6709;&#x53C2;&#x6570;&#x65F6;&#xFF0C;&#x663E;&#x793A;&#x6240;&#x6709;&#x7EBF;&#x7A0B;&#x7684;&#x4FE1;&#x606F;&#x3002;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>thread
thread
Threads Total: 125, NEW: 0, RUNNABLE: 63, BLOCKED: 0, WAITING: 39, TIMED_WAITING: 23, TERMINATED: 0                                                             
ID     NAME                GROUP        PRIORI STATE %CPU   TIME   INTER DAEMON
169    as-command-execute- system       10     RUNNA 52     0:0    <span class="token boolean">false</span> <span class="token boolean">true</span>   
102    DubboResponseTimeou main         5      TIMED 6      0:42   <span class="token boolean">false</span> <span class="token boolean">true</span>   
162    nioEventLoopGroup-2 system       10     RUNNA 5      0:0    <span class="token boolean">false</span> <span class="token boolean">false</span>  
38     Hashed wheel timer  main         5      TIMED 4      0:14   <span class="token boolean">false</span> <span class="token boolean">false</span>  
48     New I/O boss <span class="token comment">#21    main         5      RUNNA 3      0:2    false false  </span>
24     Hashed wheel timer  main         5      TIMED 2      0:14   <span class="token boolean">false</span> <span class="token boolean">false</span>  
136    Hashed wheel timer  main         5      TIMED 2      0:14   <span class="token boolean">false</span> <span class="token boolean">false</span>  
167    nioEventLoopGroup-2 system       10     RUNNA 2      0:0    <span class="token boolean">false</span> <span class="token boolean">false</span>  
17     qconfig-loader boss main         5      RUNNA 2      0:2    <span class="token boolean">false</span> <span class="token boolean">true</span>   
33     Hashed wheel timer  main         5      TIMED 1      0:14   <span class="token boolean">false</span> <span class="token boolean">false</span>  
49     Hashed wheel timer  main         5      TIMED 1      0:14   <span class="token boolean">false</span> <span class="token boolean">false</span>  
127    Hashed wheel timer  main         5      TIMED 1      0:14   <span class="token boolean">false</span> <span class="token boolean">false</span>  
137    New I/O boss <span class="token comment">#39    main         5      RUNNA 1      0:2    false true   </span>
39     New I/O worker <span class="token comment">#13  main         5      RUNNA 1      0:2    false true   </span>
41     New I/O worker <span class="token comment">#15  main         5      RUNNA 1      0:2    false true   </span>
</pre><p>3&#x3001;thread id&#xFF0C; &#x663E;&#x793A;&#x6307;&#x5B9A;&#x7EBF;&#x7A0B;&#x7684;&#x8FD0;&#x884C;&#x5806;&#x6808;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>thread 170
<span class="token string">&quot;as-command-execute-daemon&quot;</span> Id<span class="token operator">=</span>170 RUNNABLE
    at sun.management.ThreadImpl.dumpThreads0<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
    at sun.management.ThreadImpl.getThreadInfo<span class="token punctuation">(</span>ThreadImpl.java:440<span class="token punctuation">)</span>
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processThread<span class="token punctuation">(</span>ThreadCommand.java:146<span class="token punctuation">)</span>
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process<span class="token punctuation">(</span>ThreadCommand.java:77<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process<span class="token punctuation">(</span>AnnotatedCommandImpl.java:82<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access<span class="token variable">$100</span><span class="token punctuation">(</span>AnnotatedCommandImpl.java:18<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl<span class="token variable">$ProcessHandler</span>.handle<span class="token punctuation">(</span>AnnotatedCommandImpl.java:111<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl<span class="token variable">$ProcessHandler</span>.handle<span class="token punctuation">(</span>AnnotatedCommandImpl.java:108<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.system.impl.ProcessImpl<span class="token variable">$CommandProcessTask</span>.run<span class="token punctuation">(</span>ProcessImpl.java:370<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1145<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:615<span class="token punctuation">)</span>
    at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>

    Number of locked synchronizers <span class="token operator">=</span> 1
    - java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker@2ac0801d</span>

Affect<span class="token punctuation">(</span>row-cnt:0<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 60 ms.
</pre><p>4&#x3001;thread -b, &#x627E;&#x51FA;&#x5F53;&#x524D;&#x963B;&#x585E;&#x5176;&#x4ED6;&#x7EBF;&#x7A0B;&#x7684;&#x7EBF;&#x7A0B;</p>
<p>&#x6709;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x53D1;&#x73B0;&#x5E94;&#x7528;&#x5361;&#x4F4F;&#x4E86;&#xFF0C; &#x901A;&#x5E38;&#x662F;&#x7531;&#x4E8E;&#x67D0;&#x4E2A;&#x7EBF;&#x7A0B;&#x62FF;&#x4F4F;&#x4E86;&#x67D0;&#x4E2A;&#x9501;&#xFF0C; &#x5E76;&#x4E14;&#x5176;&#x4ED6;&#x7EBF;&#x7A0B;&#x90FD;&#x5728;&#x7B49;&#x5F85;&#x8FD9;&#x628A;&#x9501;&#x9020;&#x6210;&#x7684;&#x3002; &#x4E3A;&#x4E86;&#x6392;&#x67E5;&#x8FD9;&#x7C7B;&#x95EE;&#x9898;&#xFF0C; Bistoury&#x63D0;&#x4F9B;&#x4E86;thread -b&#xFF0C; &#x4E00;&#x952E;&#x627E;&#x51FA;&#x90A3;&#x4E2A;&#x7F6A;&#x9B41;&#x7978;&#x9996;&#x3002;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>thread -b
<span class="token string">&quot;http-bio-8080-exec-4&quot;</span> Id<span class="token operator">=</span>27 TIMED_WAITING
    at java.lang.Thread.sleep<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
    at test.arthas.TestThreadBlocking.doGet<span class="token punctuation">(</span>TestThreadBlocking.java:22<span class="token punctuation">)</span>
    -  locked java.lang.Object@725be470 <span class="token operator">&lt;</span>---- but blocks 4 other threads<span class="token operator">!</span>
    at javax.servlet.http.HttpServlet.service<span class="token punctuation">(</span>HttpServlet.java:624<span class="token punctuation">)</span>
    at javax.servlet.http.HttpServlet.service<span class="token punctuation">(</span>HttpServlet.java:731<span class="token punctuation">)</span>
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:303<span class="token punctuation">)</span>
    at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:208<span class="token punctuation">)</span>
    at org.apache.tomcat.websocket.server.WsFilter.doFilter<span class="token punctuation">(</span>WsFilter.java:52<span class="token punctuation">)</span>
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:241<span class="token punctuation">)</span>
    at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:208<span class="token punctuation">)</span>
    at test.filter.TestDurexFilter.doFilter<span class="token punctuation">(</span>TestDurexFilter.java:46<span class="token punctuation">)</span>
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:241<span class="token punctuation">)</span>
    at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:208<span class="token punctuation">)</span>
    at org.apache.catalina.core.StandardWrapperValve.invoke<span class="token punctuation">(</span>StandardWrapperValve.java:220<span class="token punctuation">)</span>
    at org.apache.catalina.core.StandardContextValve.invoke<span class="token punctuation">(</span>StandardContextValve.java:122<span class="token punctuation">)</span>
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke<span class="token punctuation">(</span>AuthenticatorBase.java:505<span class="token punctuation">)</span>
    at com.taobao.tomcat.valves.ContextLoadFilterValve<span class="token variable">$FilterChainAdapter</span>.doFilter<span class="token punctuation">(</span>ContextLoadFilterValve.java:191<span class="token punctuation">)</span>
    at com.taobao.eagleeye.EagleEyeFilter.doFilter<span class="token punctuation">(</span>EagleEyeFilter.java:81<span class="token punctuation">)</span>
    at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke<span class="token punctuation">(</span>ContextLoadFilterValve.java:150<span class="token punctuation">)</span>
    at org.apache.catalina.core.StandardHostValve.invoke<span class="token punctuation">(</span>StandardHostValve.java:170<span class="token punctuation">)</span>
    at org.apache.catalina.valves.ErrorReportValve.invoke<span class="token punctuation">(</span>ErrorReportValve.java:103<span class="token punctuation">)</span>
    at org.apache.catalina.core.StandardEngineValve.invoke<span class="token punctuation">(</span>StandardEngineValve.java:116<span class="token punctuation">)</span>
    at org.apache.catalina.connector.CoyoteAdapter.service<span class="token punctuation">(</span>CoyoteAdapter.java:429<span class="token punctuation">)</span>
    at org.apache.coyote.http11.AbstractHttp11Processor.process<span class="token punctuation">(</span>AbstractHttp11Processor.java:1085<span class="token punctuation">)</span>
    at org.apache.coyote.AbstractProtocol<span class="token variable">$AbstractConnectionHandler</span>.process<span class="token punctuation">(</span>AbstractProtocol.java:625<span class="token punctuation">)</span>
    at org.apache.tomcat.util.net.JIoEndpoint<span class="token variable">$SocketProcessor</span>.run<span class="token punctuation">(</span>JIoEndpoint.java:318<span class="token punctuation">)</span>
    -  locked org.apache.tomcat.util.net.SocketWrapper@7127ee12
    at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1142<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:617<span class="token punctuation">)</span>
    at org.apache.tomcat.util.threads.TaskThread<span class="token variable">$WrappingRunnable</span>.run<span class="token punctuation">(</span>TaskThread.java:61<span class="token punctuation">)</span>
    at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:745<span class="token punctuation">)</span>

    Number of locked synchronizers <span class="token operator">=</span> 1
    - java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker@31a6493e</span>
</pre><blockquote>
<p><font color="red">&#x6CE8;&#x610F;</font>: &#x76EE;&#x524D;&#x53EA;&#x652F;&#x6301;&#x627E;&#x51FA;synchronized&#x5173;&#x952E;&#x5B57;&#x963B;&#x585E;&#x4F4F;&#x7684;&#x7EBF;&#x7A0B;&#xFF0C; &#x5982;&#x679C;&#x662F;java.util.concurrent.Lock&#xFF0C; &#x76EE;&#x524D;&#x8FD8;&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
</blockquote>
<p>5&#x3001;thread -i, &#x6307;&#x5B9A;&#x91C7;&#x6837;&#x65F6;&#x95F4;&#x95F4;&#x9694;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>thread -n 2 -i 1000
<span class="token string">&quot;DubboResponseTimeoutScanTimer&quot;</span> Id<span class="token operator">=</span>102 cpuUsage<span class="token operator">=</span>13% TIMED_WAITING

    at java.lang.Thread.sleep<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
    at com.alibaba.dubbo.remoting.exchange.support.DefaultFuture<span class="token variable">$RemotingInvocationTimeoutScan</span>.run<span class="token punctuation">(</span>DefaultFuture.java:315<span class="token punctuation">)</span>
    at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>


<span class="token string">&quot;as-command-execute-daemon&quot;</span> Id<span class="token operator">=</span>172 cpuUsage<span class="token operator">=</span>10% RUNNABLE
    at sun.management.ThreadImpl.dumpThreads0<span class="token punctuation">(</span>Native Method<span class="token punctuation">)</span>
    at sun.management.ThreadImpl.getThreadInfo<span class="token punctuation">(</span>ThreadImpl.java:440<span class="token punctuation">)</span>
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads<span class="token punctuation">(</span>ThreadCommand.java:133<span class="token punctuation">)</span>
    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process<span class="token punctuation">(</span>ThreadCommand.java:79<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process<span class="token punctuation">(</span>AnnotatedCommandImpl.java:82<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access<span class="token variable">$100</span><span class="token punctuation">(</span>AnnotatedCommandImpl.java:18<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl<span class="token variable">$ProcessHandler</span>.handle<span class="token punctuation">(</span>AnnotatedCommandImpl.java:111<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl<span class="token variable">$ProcessHandler</span>.handle<span class="token punctuation">(</span>AnnotatedCommandImpl.java:108<span class="token punctuation">)</span>
    at com.taobao.arthas.core.shell.system.impl.ProcessImpl<span class="token variable">$CommandProcessTask</span>.run<span class="token punctuation">(</span>ProcessImpl.java:370<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1145<span class="token punctuation">)</span>
    at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:615<span class="token punctuation">)</span>
    at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:744<span class="token punctuation">)</span>

    Number of locked synchronizers <span class="token operator">=</span> 1
    - java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker@65b3f958</span>


Affect<span class="token punctuation">(</span>row-cnt:0<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 1074 ms.
</pre><h2 class="mume-header" id="jvm">jvm</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#x5F53;&#x524D;JVM&#x4FE1;&#x606F;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-7">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>jvm
 RUNTIME                                                                                                                                              
------------------------------------------------------------------------------------------------------------------------------------------------------
 MACHINE-NAME                               16770@local                                                                           
 JVM-START-TIME                             2019-03-26 13:04:45                                                                                       
 MANAGEMENT-SPEC-VERSION                    1.2                                                                                                       
 SPEC-NAME                                  Java Virtual Machine Specification                                                                        
 SPEC-VENDOR                                Oracle Corporation                                                                                        
 SPEC-VERSION                               1.8                                                                                                       
 VM-NAME                                    Java HotSpot<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> 64-Bit Server VM                                                                         
 VM-VENDOR                                  Oracle Corporation                                                                                        
 VM-VERSION                                 25.171-b11                                                                                                
 INPUT-ARGUMENTS                            -Djava.util.logging.config.file<span class="token operator">=</span>/home/user/tomcat/www/bistoury/conf/logging.properties                 
                                            -Djava.util.logging.manager<span class="token operator">=</span>org.apache.juli.ClassLoaderLogManager                                         
                                            -Xms2048m                                                                                                 
                                            -Xmx2048m                                                                                                 
                                            -XX:NewSize<span class="token operator">=</span>256m                                                                                          
                                            -XX:PermSize<span class="token operator">=</span>256m                                                                                         
                                            -XX:+DisableExplicitGC                                                                                    
                                            -verbose:gc                                                                                               
                                            -XX:+PrintGCDateStamps                                                                                    
                                            -XX:+PrintGCDetails                                                                                       
                                            -Xloggc:/home/user/tomcat/www/bistoury/logs/gc.log                                                     
                                            -Djava.endorsed.dirs<span class="token operator">=</span>/home/user/tomcat/tomcat/endorsed                                                              
                                            -Dcatalina.base<span class="token operator">=</span>/home/user/tomcat/www/bistoury                                                         
                                            -Dcatalina.home<span class="token operator">=</span>/home/user/tomcat/tomcat                                                                            
                                            -Djava.io.tmpdir<span class="token operator">=</span>/home/user/tomcat/www/bistoury/temp                                                   
                                                                                                                                                      
 CLASS-PATH                                 /home/user/tomcat/tomcat/bin/bootstrap.jar:/home/user/tomcat/tomcat/bin/tomcat-juli.jar                                       
 BOOT-CLASS-PATH                            /home/user/tomcat/java/jdk1.8.0_171/jre/lib/resources.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/rt.jar:/home/user/tomcat/java/jdk 
                                            1.8.0_171/jre/lib/sunrsasign.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/jsse.jar:/home/user/tomcat/java/jdk1.8.0_171/jre 
                                            /lib/jce.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/charsets.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/jfr.jar:/ho 
                                            me/q/java/jdk1.8.0_171/jre/classes                                                                        
 LIBRARY-PATH                               /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib                                              
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 CLASS-LOADING                                                                                                                                        
------------------------------------------------------------------------------------------------------------------------------------------------------
 LOADED-CLASS-COUNT                         12159                                                                                                     
 TOTAL-LOADED-CLASS-COUNT                   12261                                                                                                     
 UNLOADED-CLASS-COUNT                       102                                                                                                       
 IS-VERBOSE                                 <span class="token boolean">false</span>                                                                                                     
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 COMPILATION                                                                                                                                          
------------------------------------------------------------------------------------------------------------------------------------------------------
 NAME                                       HotSpot 64-Bit Tiered Compilers                                                                           
 TOTAL-COMPILE-TIME                         127648<span class="token punctuation">(</span>ms<span class="token punctuation">)</span>                                                                                                
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 GARBAGE-COLLECTORS                                                                                                                                   
------------------------------------------------------------------------------------------------------------------------------------------------------
 PS Scavenge                                358/5908<span class="token punctuation">(</span>ms<span class="token punctuation">)</span>                                                                                              
 <span class="token punctuation">[</span>count/time<span class="token punctuation">]</span>                                                                                                                                         
 PS MarkSweep                               11/1375<span class="token punctuation">(</span>ms<span class="token punctuation">)</span>                                                                                               
 <span class="token punctuation">[</span>count/time<span class="token punctuation">]</span>                                                                                                                                         
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 MEMORY-MANAGERS                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 CodeCacheManager                           Code Cache                                                                                                
                                                                                                                                                      
 Metaspace Manager                          Metaspace                                                                                                 
                                            Compressed Class Space                                                                                    
                                                                                                                                                      
 PS Scavenge                                PS Eden Space                                                                                             
                                            PS Survivor Space                                                                                         
                                                                                                                                                      
 PS MarkSweep                               PS Eden Space                                                                                             
                                            PS Survivor Space                                                                                         
                                            PS Old Gen                                                                                                
                                                                                                                                                      
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 MEMORY                                                                                                                                               
------------------------------------------------------------------------------------------------------------------------------------------------------
 HEAP-MEMORY-USAGE                          2098200576/2147483648/2098200576/445919704                                                                
 <span class="token punctuation">[</span>committed/init/max/used<span class="token punctuation">]</span>                                                                                                                            
 NO-HEAP-MEMORY-USAGE                       120127488/2555904/-1/107844936                                                                            
 <span class="token punctuation">[</span>committed/init/max/used<span class="token punctuation">]</span>                                                                                                                            
 PENDING-FINALIZE-COUNT                     0                                                                                                         
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 OPERATING-SYSTEM                                                                                                                                     
------------------------------------------------------------------------------------------------------------------------------------------------------
 OS                                         Linux                                                                                                     
 ARCH                                       amd64                                                                                                     
 PROCESSORS-COUNT                           4                                                                                                         
 LOAD-AVERAGE                               0.0                                                                                                       
 VERSION                                    1111                                                                                
                                                                                                                                                      
------------------------------------------------------------------------------------------------------------------------------------------------------
 THREAD                                                                                                                                               
------------------------------------------------------------------------------------------------------------------------------------------------------
 COUNT                                      270                                                                                                       
 DAEMON-COUNT                               258                                                                                                       
 LIVE-COUNT                                 275                                                                                                       
 STARTED-COUNT                              2218                                                                                                      
Affect<span class="token punctuation">(</span>row-cnt:0<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 12 ms.
$
</pre><p>THREAD&#x76F8;&#x5173;</p>
<ul>
<li>COUNT: JVM&#x5F53;&#x524D;&#x6D3B;&#x8DC3;&#x7684;&#x7EBF;&#x7A0B;&#x6570;</li>
<li>DAEMON-COUNT: JVM&#x5F53;&#x524D;&#x6D3B;&#x8DC3;&#x7684;&#x5B88;&#x62A4;&#x7EBF;&#x7A0B;&#x6570;</li>
<li>PEAK-COUNT: &#x4ECE;JVM&#x542F;&#x52A8;&#x5F00;&#x59CB;&#x66FE;&#x7ECF;&#x6D3B;&#x7740;&#x7684;&#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;</li>
<li>STARTED-COUNT: &#x4ECE;JVM&#x542F;&#x52A8;&#x5F00;&#x59CB;&#x603B;&#x5171;&#x542F;&#x52A8;&#x8FC7;&#x7684;&#x7EBF;&#x7A0B;&#x6B21;&#x6570;</li>
<li>DEADLOCK-COUNT: JVM&#x5F53;&#x524D;&#x6B7B;&#x9501;&#x7684;&#x7EBF;&#x7A0B;&#x6570;</li>
</ul>
<p>&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x76F8;&#x5173;</p>
<ul>
<li>MAX-FILE-DESCRIPTOR-COUNT&#xFF1A;JVM&#x8FDB;&#x7A0B;&#x6700;&#x5927;&#x53EF;&#x4EE5;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x6570;</li>
<li>OPEN-FILE-DESCRIPTOR-COUNT&#xFF1A;JVM&#x5F53;&#x524D;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x6570;</li>
</ul>
<h2 class="mume-header" id="mbean">mbean</h2>

<blockquote>
<p>&#x67E5;&#x770B; Mbean &#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x4FBF;&#x6377;&#x7684;&#x67E5;&#x770B;&#x6216;&#x76D1;&#x63A7; Mbean &#x7684;&#x5C5E;&#x6027;&#x4FE1;&#x606F;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-1">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>name-pattern</td>
<td>&#x540D;&#x79F0;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>attribute-pattern</td>
<td>&#x5C5E;&#x6027;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[m]</td>
<td>&#x67E5;&#x770B;&#x5143;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td>[i:]</td>
<td>&#x5237;&#x65B0;&#x5C5E;&#x6027;&#x503C;&#x7684;&#x65F6;&#x95F4;&#x95F4;&#x9694; (ms)</td>
</tr>
<tr>
<td>[n:]</td>
<td>&#x5237;&#x65B0;&#x5C5E;&#x6027;&#x503C;&#x7684;&#x6B21;&#x6570;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;&#x3002;&#x4EC5;&#x5BF9;&#x5C5E;&#x6027;&#x540D;&#x6709;&#x6548;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-8">&#x5B9E;&#x4F8B;</h3>

<ul>
<li>&#x5217;&#x51FA;&#x6240;&#x6709; Mbean &#x7684;&#x540D;&#x79F0;&#xFF1A;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@qconfig:\<span class="token operator">&gt;</span>mbean
Catalina:type<span class="token operator">=</span>Service
Catalina:type<span class="token operator">=</span>StringCache
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/,name<span class="token operator">=</span>NonLoginAuthenticator
Catalina:type<span class="token operator">=</span>ThreadPool,name<span class="token operator">=</span><span class="token string">&quot;ajp-nio-8009&quot;</span>
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>SetCharacterEncoding,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
JMImplementation:type<span class="token operator">=</span>MBeanServerDelegate
java.lang:type<span class="token operator">=</span>Runtime
java.lang:type<span class="token operator">=</span>Threading
java.lang:type<span class="token operator">=</span>MemoryPool,name<span class="token operator">=</span>Code Cache
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>Tomcat WebSocket <span class="token punctuation">(</span>JSR356<span class="token punctuation">)</span> Filter,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.nio:type<span class="token operator">=</span>BufferPool,name<span class="token operator">=</span>direct
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>watcher,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>NamingResources
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>htmlLoginValidateFilter,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>MemoryManager,name<span class="token operator">=</span>CodeCacheManager
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,name<span class="token operator">=</span>ErrorReportValve
java.lang:type<span class="token operator">=</span>ClassLoading
Catalina:type<span class="token operator">=</span>ParallelWebappClassLoader,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/
java.lang:type<span class="token operator">=</span>GarbageCollector,name<span class="token operator">=</span>PS MarkSweep
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>CSRF,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>MemoryPool,name<span class="token operator">=</span>Metaspace
Catalina:type<span class="token operator">=</span>JspMonitor,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>jsp,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>MemoryPool,name<span class="token operator">=</span>PS Old Gen
Catalina:type<span class="token operator">=</span>Valve,name<span class="token operator">=</span>StandardEngineValve
Catalina:j2eeType<span class="token operator">=</span>WebModule,name<span class="token operator">=</span>//localhost/,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>GarbageCollector,name<span class="token operator">=</span>PS Scavenge
Users:type<span class="token operator">=</span>UserDatabase,database<span class="token operator">=</span>UserDatabase
Catalina:type<span class="token operator">=</span>ProtocolHandler,port<span class="token operator">=</span>8009
java.lang:type<span class="token operator">=</span>MemoryPool,name<span class="token operator">=</span>PS Eden Space
Catalina:type<span class="token operator">=</span>RequestProcessor,worker<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>,name<span class="token operator">=</span>HttpRequest3
Catalina:type<span class="token operator">=</span>Realm,realmPath<span class="token operator">=</span>/realm0
Catalina:type<span class="token operator">=</span>ThreadPool,name<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>
Catalina:type<span class="token operator">=</span>GlobalRequestProcessor,name<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>
Catalina:type<span class="token operator">=</span>Deployer,host<span class="token operator">=</span>localhost
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>encodingFilter,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>Manager,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager
java.nio:type<span class="token operator">=</span>BufferPool,name<span class="token operator">=</span>mapped
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>springmvc,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>MemoryPool,name<span class="token operator">=</span>PS Survivor Space
com.sun.management:type<span class="token operator">=</span>DiagnosticCommand
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>jsp,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>Server
Catalina:type<span class="token operator">=</span>WebResourceRoot,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager,name<span class="token operator">=</span>StandardContextValve
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>default,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
com.sun.management:type<span class="token operator">=</span>HotSpotDiagnostic
Catalina:type<span class="token operator">=</span>RequestProcessor,worker<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>,name<span class="token operator">=</span>HttpRequest4
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/,name<span class="token operator">=</span>StandardContextValve
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>userContextFilter,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>NamingResources,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>jsonLoginValidateFilter,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>Status,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>RequestProcessor,worker<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>,name<span class="token operator">=</span>HttpRequest2
Catalina:type<span class="token operator">=</span>Mapper
Catalina:j2eeType<span class="token operator">=</span>Filter,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>Tomcat WebSocket <span class="token punctuation">(</span>JSR356<span class="token punctuation">)</span> Filter,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,name<span class="token operator">=</span>StandardHostValve
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>default,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>OperatingSystem
Catalina:type<span class="token operator">=</span>Realm,realmPath<span class="token operator">=</span>/realm0/realm0
java.lang:type<span class="token operator">=</span>Compilation
Catalina:type<span class="token operator">=</span>Resource,resourcetype<span class="token operator">=</span>Global,class<span class="token operator">=</span>org.apache.catalina.UserDatabase,name<span class="token operator">=</span><span class="token string">&quot;UserDatabase&quot;</span>
Catalina:type<span class="token operator">=</span>Host,host<span class="token operator">=</span>localhost
Catalina:type<span class="token operator">=</span>GlobalRequestProcessor,name<span class="token operator">=</span><span class="token string">&quot;ajp-nio-8009&quot;</span>
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>JMXProxy,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>HTMLManager,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>WebResourceRoot,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/,name<span class="token operator">=</span>Cache
Catalina:type<span class="token operator">=</span>Engine
java.util.logging:type<span class="token operator">=</span>Logging
Catalina:type<span class="token operator">=</span>ProtocolHandler,port<span class="token operator">=</span>8181
Catalina:type<span class="token operator">=</span>RequestProcessor,worker<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>,name<span class="token operator">=</span>HttpRequest5
java.lang:type<span class="token operator">=</span>MemoryManager,name<span class="token operator">=</span>Metaspace Manager
Catalina:type<span class="token operator">=</span>MBeanFactory
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager,name<span class="token operator">=</span>RemoteAddrValve
Catalina:type<span class="token operator">=</span>Manager,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager,name<span class="token operator">=</span>BasicAuthenticator
Catalina:type<span class="token operator">=</span>RequestProcessor,worker<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>,name<span class="token operator">=</span>HttpRequest6
Catalina:j2eeType<span class="token operator">=</span>WebModule,name<span class="token operator">=</span>//localhost/manager,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>Connector,port<span class="token operator">=</span>8009
Catalina:type<span class="token operator">=</span>Valve,host<span class="token operator">=</span>localhost,name<span class="token operator">=</span>AccessLogValve
Catalina:type<span class="token operator">=</span>Loader,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/
java.lang:type<span class="token operator">=</span>MemoryPool,name<span class="token operator">=</span>Compressed Class Space
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>jsp,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
java.lang:type<span class="token operator">=</span>Memory
Catalina:type<span class="token operator">=</span>NamingResources,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager
Catalina:type<span class="token operator">=</span>WebResourceRoot,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager,name<span class="token operator">=</span>Cache
Catalina:type<span class="token operator">=</span>RequestProcessor,worker<span class="token operator">=</span><span class="token string">&quot;http-nio-8181&quot;</span>,name<span class="token operator">=</span>HttpRequest1
Catalina:type<span class="token operator">=</span>ParallelWebappClassLoader,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager
Catalina:j2eeType<span class="token operator">=</span>Servlet,WebModule<span class="token operator">=</span>//localhost/manager,name<span class="token operator">=</span>Manager,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>WebResourceRoot,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager
Catalina:type<span class="token operator">=</span>Loader,host<span class="token operator">=</span>localhost,context<span class="token operator">=</span>/manager
Catalina:type<span class="token operator">=</span>JspMonitor,WebModule<span class="token operator">=</span>//localhost/,name<span class="token operator">=</span>jsp,J2EEApplication<span class="token operator">=</span>none,J2EEServer<span class="token operator">=</span>none
Catalina:type<span class="token operator">=</span>Connector,port<span class="token operator">=</span>8181
</pre><ul>
<li>&#x67E5;&#x770B; Mbean &#x7684;&#x5143;&#x4FE1;&#x606F;&#xFF1A;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>mbean -m java.lang:type<span class="token operator">=</span>Threading
 NAME                   VALUE                                                                                                                         
------------------------------------------------------------------------------------------------------------------------------------------------------
 MBeanInfo                                                                                                                                            
 Info:                                                                                                                                                
 ObjectName             java.lang:type<span class="token operator">=</span>Threading                                                                                                      
 ClassName              sun.management.ThreadImpl                                                                                                     
 Description            Information on the management interface of the MBean                                                                          
 Info Descriptor:                                                                                                                                     
 immutableInfo          <span class="token boolean">true</span>                                                                                                                          
 interfaceClassName     com.sun.management.ThreadMXBean                                                                                               
 mxbean                 <span class="token boolean">true</span>                                                                                                                          
 MBeanAttributeInfo                                                                                                                                   
 Attribute:                                                                                                                                           
 Name                   ThreadAllocatedMemoryEnabled                                                                                                  
 Description            ThreadAllocatedMemoryEnabled                                                                                                  
 Readable               <span class="token boolean">true</span>                                                                                                                          
 Writable               <span class="token boolean">true</span>                                                                                                                          
 Is                     <span class="token boolean">true</span>                                                                                                                          
 Type                   boolean                                                                                                                       
 Attribute Descriptor:                                                                                                                                
 openType               javax.management.openmbean.SimpleType<span class="token punctuation">(</span>name<span class="token operator">=</span>java.lang.Boolean<span class="token punctuation">)</span>                                                                 
 originalType           boolean                                                                                                                       
 MBeanAttributeInfo                                                                                                                                   
 Attribute:                                                                                                                                           
 Name                   ThreadAllocatedMemorySupported                                                                                                
 Description            ThreadAllocatedMemorySupported                                                                                                
 Readable               <span class="token boolean">true</span>                                                                                                                          
 Writable               <span class="token boolean">false</span>                                                                                                                         
 Is                     <span class="token boolean">true</span>                                                                                                                          
 Type                   boolean                                                                                                                       
 Attribute Descriptor:                                                                                                                                
 openType               javax.management.openmbean.SimpleType<span class="token punctuation">(</span>name<span class="token operator">=</span>java.lang.Boolean<span class="token punctuation">)</span>                                                                 
 originalType           boolean                                                                                                                       
</pre><ul>
<li>&#x67E5;&#x770B;mbean&#x5C5E;&#x6027;&#x4FE1;&#x606F;&#xFF1A;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell"> mbean java.lang:type<span class="token operator">=</span>Threading 
</pre><ul>
<li>mbean&#x7684;name&#x652F;&#x6301;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;&#xFF1A;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">mbean java.lang:type<span class="token operator">=</span>Th*
</pre><blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;ObjectName &#x7684;&#x5339;&#x914D;&#x89C4;&#x5219;&#x4E0E;&#x6B63;&#x5E38;&#x7684;&#x901A;&#x914D;&#x7B26;&#x5B58;&#x5728;&#x5DEE;&#x5F02;&#xFF0C;&#x8BE6;&#x7EC6;&#x53C2;&#x89C1;&#xFF1A;<a href="https://docs.oracle.com/javase/8/docs/api/javax/management/ObjectName.html?is-external=true">javax.management.ObjectName</a></p>
</blockquote>
<ul>
<li>&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;&#x7279;&#x5B9A;&#x7684;&#x5C5E;&#x6027;&#x5B57;&#x6BB5;&#xFF1A;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">mbean java.lang:type<span class="token operator">=</span>Threading *Count
</pre><ul>
<li>&#x4F7F;&#x7528;-E&#x547D;&#x4EE4;&#x5207;&#x6362;&#x4E3A;&#x6B63;&#x5219;&#x5339;&#x914D;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">mbean -E java.lang:type<span class="token operator">=</span>Threading PeakThreadCount<span class="token operator">|</span>ThreadCount<span class="token operator">|</span>DaemonThreadCount
</pre><ul>
<li>&#x4F7F;&#x7528;-i&#x547D;&#x4EE4;&#x5B9E;&#x65F6;&#x76D1;&#x63A7;&#xFF1A;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>mbean -i 1000 java.lang:type<span class="token operator">=</span>Threading *Count
 NAME                     VALUE                                                                                                                       
--------------------------------                                                                                                                      
 ThreadCount              97                                                                                                                          
 TotalStartedThreadCount  116                                                                                                                         
 DaemonThreadCount        84                                                                                                                          
 PeakThreadCount          97                                                                                                                          

 NAME                     VALUE                                                                                                                       
--------------------------------                                                                                                                      
 ThreadCount              97                                                                                                                          
 TotalStartedThreadCount  116                                                                                                                         
 DaemonThreadCount        84                                                                                                                          
 PeakThreadCount          97                                                                                                                          

 NAME                     VALUE                                                                                                                       
--------------------------------                                                                                                                      
 ThreadCount              97                                                                                                                          
 TotalStartedThreadCount  116                                                                                                                         
 DaemonThreadCount        84                                                                                                                          
 PeakThreadCount          97                       
</pre><h2 class="mume-header" id="sysprop">sysprop</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#x548C;&#x4FEE;&#x6539;&#x5F53;&#x524D;JVM&#x7684;&#x7CFB;&#x7EDF;&#x5C5E;&#x6027;(<code>System Property</code>)</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-9">&#x5B9E;&#x4F8B;</h3>

<p>&#x67E5;&#x770B;&#x6240;&#x6709;&#x5C5E;&#x6027;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysprop
 KEY                           VALUE                                                                                                                  
------------------------------------------------------------------------------------------------------------------------------------------------------
 java.vendor                   Oracle Corporation                                                                                                     
 sun.java.launcher             SUN_STANDARD                                                                                                           
 catalina.base                 /home/user/tomcat/www/local.example.com                                                                                      
 sun.management.compiler       HotSpot 64-Bit Tiered Compilers                                                                                        
 sun.nio.ch.bugLevel                                                                                                                                  
 catalina.useNaming            <span class="token boolean">true</span>                                                                                                                   
 os.name                       Linux                                                                                                                  
 sun.boot.class.path           /home/user/tomcat/java/jdk1.8.0_171/jre/lib/resources.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/rt.jar:/home/user/tomcat/java/jdk1.8.0_171/jre 
                               /lib/sunrsasign.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/jsse.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/jce.jar:/home/user/tomcat/java/ 
                               jdk1.8.0_171/jre/lib/charsets.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/lib/jfr.jar:/home/user/tomcat/java/jdk1.8.0_171/jre/classes      
 java.util.logging.config.fil  /home/user/tomcat/www/local.example.com/conf/logging.properties                                                              
 e                                                                                                                                                    
 qconfig.symbol.beta           beta                                                                                                                   
 java.vm.specification.vendor  Oracle Corporation                                                                                                     
 java.runtime.version          1.8.0_171-b11                                                                                                          
 user.name                     tomcat                                                                                                                 
 shared.loader                                                                                                                                        
 tomcat.util.buf.StringCache.  <span class="token boolean">true</span>                                                                                                                   
 byte.enabled                                                                                                                                         
 user.language                 en                                                                                                                     
 java.naming.factory.initial   org.apache.naming.java.javaURLContextFactory                                                          
 sun.boot.library.path         /home/user/tomcat/java/jdk1.8.0_171/jre/lib/amd64                                                                                
 java.version                  1.8.0_171                                                                                                              
 java.util.logging.manager     org.apache.juli.ClassLoaderLogManager                                                                                  
 user.timezone                 PRC                                                                                                                    
 sun.arch.data.model           64                                                                                                                     
 java.endorsed.dirs            /home/user/tomcat/tomcat/endorsed                                                                                                
 java.rmi.server.randomIDs     <span class="token boolean">true</span>                                                                                                                   
 sun.cpu.isalist                                                                                                                                      
 sun.jnu.encoding              UTF-8                                                                                                                  
 file.encoding.pkg             sun.io                                                                                                                 
 package.access                sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.                          
 file.separator                /                                                                                                                      
 java.specification.name       Java Platform API Specification                                                                                        
 java.class.version            52.0                                                                                                                   
 user.country                  US                                                                                                                     
 java.home                     /home/user/tomcat/java/jdk1.8.0_171/jre                                                                                          
 java.vm.info                  mixed mode                                                                                                             
 os.version                    2.6.32-358.23.2.el6.x86_64                 
 path.separator                <span class="token keyword">:</span>                                                                                                                      
 java.vm.version               25.171-b11                                                                                                             
 java.awt.printerjob           sun.print.PSPrinterJob                                                                                                 
 sun.io.unicode.encoding       UnicodeLittle                                                                                                          
 qconfig.symbol.resources      resources                                                                                                              
 awt.toolkit                   sun.awt.X11.XToolkit                                                                                                   
 package.definition            sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper                                                     java.naming.factory.url.pkgs  org.apache.naming                                                                                                      
 java.specification.vendor     Oracle Corporation                                                                                                     
 java.library.path             /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib                                                           
 java.vendor.url               http://java.oracle.com/                                                                                                
 qconfig.server.app            qconfig                                                                                                                
 java.vm.vendor                Oracle Corporation                                                                                                     
 common.loader                 <span class="token variable">${catalina.base}</span>/lib,<span class="token variable">${catalina.base}</span>/lib/*.jar,<span class="token variable">${catalina.home}</span>/lib,<span class="token variable">${catalina.home}</span>/lib/*.jar                        
 java.runtime.name             Java<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> SE Runtime Environment                                                                                                 
 sun.java.command              org.apache.catalina.startup.Bootstrap start                                                                            
 java.class.path               /home/user/tomcat/tomcat/bin/bootstrap.jar:/home/user/tomcat/tomcat/bin/tomcat-juli.jar                                                    
 java.vm.specification.name    Java Virtual Machine Specification                                                                                 
 java.vm.specification.versio  1.8                                                                                                                    
 n                                                                                                                                                    
 catalina.home                 /home/user/tomcat/tomcat                                                                                                         
 sun.cpu.endian                little                                                                                                                 
 sun.os.patch.level            unknown                                                                                                                
 java.io.tmpdir                /home/user/tomcat/www/local.example.com/temp                                                                                 
 java.vendor.url.bug           http://bugreport.sun.com/bugreport/                                                                                                
 java.awt.graphicsenv          sun.awt.X11GraphicsEnvironment                                                                                         
 os.arch                       amd64                                                                                                                  
 java.ext.dirs                 /home/user/tomcat/java/jdk1.8.0_171/jre/lib/ext:/usr/java/packages/lib/ext                                                       
 user.dir                      /tmp/hsperfdata_tomcat                                                                                                 
 qconfig.symbol.prod           prod                                                                                                                   
 line.separator                                                                                                                                       
                                                                                                                                                      
 java.vm.name                  Java HotSpot<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> 64-Bit Server VM                                                            
 common.server.subEnv                                                                                                                                 
 file.encoding                 UTF-8                                                                                                                  
 qconfig.symbol.buildgroup     buildGroup                                                                                                             
 curator-dont-log-connection-  <span class="token boolean">false</span>                                                                                                                  
 problems                                                                                                                                             
 java.specification.version    1.8                                                                                                                    
 common.server.env             dev                                                                                                                    
$ 
</pre><p>&#x67E5;&#x770B;&#x5355;&#x4E2A;&#x5C5E;&#x6027;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysprop java.version
java.version<span class="token operator">=</span>1.7.0_45
</pre><p>&#x4FEE;&#x6539;&#x5355;&#x4E2A;&#x5C5E;&#x6027;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysprop user.country
user.country<span class="token operator">=</span>CN
root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysprop user.country US
Successfully changed the system property.
user.country<span class="token operator">=</span>US
root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysprop user.country
user.country<span class="token operator">=</span>US
</pre><h2 class="mume-header" id="sysenv">sysenv</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#x5F53;&#x524D;JVM&#x7684;&#x73AF;&#x5883;&#x5C5E;&#x6027;(System Environment Variables)</p>
</blockquote>
<h3 class="mume-header" id="%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83">&#x4F7F;&#x7528;&#x53C2;&#x8003;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell"> USAGE:
   sysenv <span class="token punctuation">[</span>-h<span class="token punctuation">]</span> <span class="token punctuation">[</span>env-name<span class="token punctuation">]</span>

 SUMMARY:
   Display the system env.

 EXAMPLES:
   sysenv
   sysenv USER

 WIKI:
   https://alibaba.github.io/arthas/sysenv

 OPTIONS:
 -h, --help                                                 this <span class="token function">help</span>
 <span class="token operator">&lt;</span>env-name<span class="token operator">&gt;</span>                                                 <span class="token function">env</span> name
</pre><h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-10">&#x5B9E;&#x4F8B;</h3>

<p>&#x67E5;&#x770B;&#x6240;&#x6709;&#x73AF;&#x5883;&#x53D8;&#x91CF;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysenv
 KEY                           VALUE                                                                                                                  
------------------------------------------------------------------------------------------------------------------------------------------------------
 USERDOMAIN_ROAMINGPROFILE     LEIXIE                                                                                                                 
 PROCESSOR_LEVEL               6                                                                                                                      
 _RUNJAVA                      <span class="token string">&quot;C:\Program Files\Java\jdk1.8.0_201\bin\java.exe&quot;</span>                                                                      
 JSSE_OPTS                     <span class="token string">&quot;-Djdk.tls.ephemeralDHKeySize=2048&quot;</span>                                                                                    
 SESSIONNAME                   Console                                                                                                                
 ALLUSERSPROFILE               C:\ProgramData                                                                                                         
 JAVA_OPTS                     suspend<span class="token operator">=</span>y,server<span class="token operator">=</span>n -javaagent:C:\Users\root\.IntelliJId 
                               ea2018.3\system\captureAgent\debugger-agent.jar -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -ve 
                               rbose:gc -Xloggc:E:/logs/gc.log  -Dcom.sun.management.jmxremote<span class="token operator">=</span> -Dcom.sun.management.jmxremote.port<span class="token operator">=</span>1191 -Dcom.sun.ma 
                               nagement.jmxremote.ssl<span class="token operator">=</span>false -Dcom.sun.management.jmxremote.password.file<span class="token operator">=</span>C:\Users\root\.IntelliJIdea2018.3\system 
                               \tomcat\Unnamed_realtimelogviewer\jmxremote.password -Dcom.sun.management.jmxremote.access.file<span class="token operator">=</span>C:\Users\root\.Int 
                               elliJIdea2018.3\system\tomcat\Unnamed_realtimelogviewer\jmxremote.access -Djava.rmi.server.hostname<span class="token operator">=</span>127.0.0.1 <span class="token string">&quot;-Djdk.t 
                               ls.ephemeralDHKeySize=2048&quot;</span> -Djava.protocol.handler.pkgs<span class="token operator">=</span>org.apache.catalina.webresources                              
 PROCESSOR_ARCHITECTURE        AMD64                                                                                                                  
 PSModulePath                  C:\Program Files\WindowsPowerShell\Modules<span class="token punctuation">;</span>C:\Windows\system32\WindowsPowerShell\v1.0\Modules                          
 SystemDrive                   C:                                                                                                                     
 ENDORSED_PROP                 ignore.endorsed.dirs                                                                                                   
 JRE_HOME                      C:\Program Files\Java\jdk1.8.0_201                                                                                     
 <span class="token operator">=</span>E:                           E:\software\tomcat\apache-tomcat-8.5.38\bin                                                                            
 MAVEN_HOME                    E:\software\maven\apache-maven-3.5.4                                                                                   
 USERNAME                      root                                                                                                               
 ProgramFiles<span class="token punctuation">(</span>x86<span class="token punctuation">)</span>             C:\Program Files <span class="token punctuation">(</span>x86<span class="token punctuation">)</span>                                                                                                 
 FPS_BROWSER_USER_PROFILE_STR  Default                                                                                                                
 ING                                                                                                                                                  
 PATHEXT                       .COM<span class="token punctuation">;</span>.EXE<span class="token punctuation">;</span>.BAT<span class="token punctuation">;</span>.CMD<span class="token punctuation">;</span>.VBS<span class="token punctuation">;</span>.VBE<span class="token punctuation">;</span>.JS<span class="token punctuation">;</span>.JSE<span class="token punctuation">;</span>.WSF<span class="token punctuation">;</span>.WSH<span class="token punctuation">;</span>.MSC<span class="token punctuation">;</span>.PY<span class="token punctuation">;</span>.PYW                                                         
 DriverData                    C:\Windows\System32\Drivers\DriverData                                                                                 
 OneDriveConsumer              C:\Users\root\OneDrive                                                                                             
 ProgramData                   C:\ProgramData                                                                                                         
 ProgramW6432                  C:\Program Files                                                                                                       
 HOMEPATH                      \Users\root                                                                                                        
 _RUNJDB                       <span class="token string">&quot;C:\Program Files\Java\jdk1.8.0_201\bin\jdb.exe&quot;</span>                                                                       
 PROCESSOR_IDENTIFIER          Intel64 Family 6 Model 142 Stepping 9, GenuineIntel                                                                    
 LOGGING_CONFIG                -Djava.util.logging.config.file<span class="token operator">=</span><span class="token string">&quot;C:\Users\root\.IntelliJIdea2018.3\system\tomcat\Unnamed_realtimelogviewer\conf\lo 
                               gging.properties&quot;</span>                                                                                                      
 ProgramFiles                  C:\Program Files                                                                                                       
 PUBLIC                        C:\Users\Public                                                                                                        
 CURRENT_DIR                   E:\software\tomcat\apache-tomcat-8.5.38\bin                                                                            
 windir                        C:\Windows                                                                                                             
 <span class="token operator">=</span>::                           ::\                                                                                                                    
 ZOOKEEPER_HOME                E:\software\zookeeper-3.4.13                                                                                           
 LOCALAPPDATA                  C:\Users\root\AppData\Local                                                                                        
 IntelliJ IDEA                 D:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\bin<span class="token punctuation">;</span>                                                                 
 CATALINA_TMPDIR               E:\software\tomcat\apache-tomcat-8.5.38\temp                                                                           
 USERDOMAIN                    ROOT                                                                                                                 
 FPS_BROWSER_APP_PROFILE_STRI  Internet Explorer                                                                                                      
 NG                                                                                                                                                   
 LOGONSERVER                   \\ROOT                                                                                                               
 JAVA_HOME                     C:\Program Files\Java\jdk1.8.0_201                                                                                     
 PROMPT                        <span class="token variable">$P</span><span class="token variable">$G</span>                                                                                                                   
 CATALINA_BASE                 C:\Users\root\.IntelliJIdea2018.3\system\tomcat\Unnamed_realtimelogviewer                                          
 OneDrive                      C:\Users\root\OneDrive                                                                                             
 APPDATA                       C:\Users\root\AppData\Roaming                                                                                      
 _EXECJAVA                     <span class="token string">&quot;C:\Program Files\Java\jdk1.8.0_201\bin\java.exe&quot;</span>                                                                      
 CommonProgramFiles            C:\Program Files\Common Files                                                                                          
 Path                          D:\Program Files\python37\Scripts\<span class="token punctuation">;</span>D:\Program Files\python37\<span class="token punctuation">;</span>D:\Program Files\NetSarang\<span class="token punctuation">;</span>C:\Program Files <span class="token punctuation">(</span>x86<span class="token punctuation">)</span>\Commo 
                               n Files\Oracle\Java\javapath<span class="token punctuation">;</span>C:\Windows\system32<span class="token punctuation">;</span>C:\Windows<span class="token punctuation">;</span>C:\Windows\System32\Wbem<span class="token punctuation">;</span>C:\Windows\System32\WindowsPowerS 
                               hell\v1.0\<span class="token punctuation">;</span>C:\Windows\System32\OpenSSH\<span class="token punctuation">;</span>C:\Program Files\Java\jdk1.8.0_201\bin<span class="token punctuation">;</span>C:\Program Files\Git\cmd<span class="token punctuation">;</span>E:\software\ma 
                               ven\apache-maven-3.5.4\bin<span class="token punctuation">;</span>E:\software\zookeeper-3.4.13\bin<span class="token punctuation">;</span><span class="token punctuation">;</span>D:\Program Files\UltraEdit<span class="token punctuation">;</span>C:\Program Files\IDM Computer  
                               Solutions\UltraCompare<span class="token punctuation">;</span>C:\Program Files\nodejs\<span class="token punctuation">;</span>C:\Users\root\AppData\Local\Microsoft\WindowsApps<span class="token punctuation">;</span><span class="token punctuation">;</span>D:\Program File 
                               s\JetBrains\IntelliJ IDEA 2018.3.5\bin<span class="token punctuation">;</span><span class="token punctuation">;</span>D:\Program Files\Microsoft VS Code\bin<span class="token punctuation">;</span>C:\Users\root\AppData\Local\Program 
                               s\EmEditor<span class="token punctuation">;</span>C:\Users\root\AppData\Roaming\npm                                                                       
 OS                            Windows_NT                                                                                                             
 COMPUTERNAME                  LEIXIE                                                                                                                 
 CATALINA_HOME                 E:\software\tomcat\apache-tomcat-8.5.38                                                                                
 MAINCLASS                     org.apache.catalina.startup.Bootstrap                                                                                  
 JDK_JAVA_OPTIONS               --add-opens<span class="token operator">=</span>java.base/java.lang<span class="token operator">=</span>ALL-UNNAMED --add-opens<span class="token operator">=</span>java.base/java.io<span class="token operator">=</span>ALL-UNNAMED --add-opens<span class="token operator">=</span>java.rmi/sun.rmi.tr 
                               ansport<span class="token operator">=</span>ALL-UNNAMED                                                                                                    
 LOGGING_MANAGER               -Djava.util.logging.manager<span class="token operator">=</span>org.apache.juli.ClassLoaderLogManager                                                      
 PROCESSOR_REVISION            8e09                                                                                                                   
 CLASSPATH                     E:\software\tomcat\apache-tomcat-8.5.38\bin\bootstrap.jar<span class="token punctuation">;</span>E:\software\tomcat\apache-tomcat-8.5.38\bin\tomcat-juli.jar  
 CommonProgramW6432            C:\Program Files\Common Files                                                                                          
 ComSpec                       C:\Windows\system32\cmd.exe                                                                                            
 CLASS_PATH                    <span class="token keyword">.</span><span class="token punctuation">;</span>C:\Program Files\Java\jdk1.8.0_201\lib<span class="token punctuation">;</span>                                                                              
 SystemRoot                    C:\Windows                                                                                                             
 TEMP                          C:\Users\root\AppData\Local\Temp                                                                                   
 ACTION                        start                                                                                                                  
 HOMEDRIVE                     C:                                                                                                                     
 USERPROFILE                   C:\Users\root                                                                                                      
 TMP                           C:\Users\root\AppData\Local\Temp                                                                                   
 CommonProgramFiles<span class="token punctuation">(</span>x86<span class="token punctuation">)</span>       C:\Program Files <span class="token punctuation">(</span>x86<span class="token punctuation">)</span>\Common Files                                                                                    
 NUMBER_OF_PROCESSORS          4                                                                                                                      
$ 
</pre><p>&#x67E5;&#x770B;&#x5355;&#x4E2A;&#x73AF;&#x5883;&#x53D8;&#x91CF;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sysenv MAINCLASS
MAINCLASS<span class="token operator">=</span>org.apache.catalina.startup.Bootstrap
$
</pre><h2 class="mume-header" id="vmoption">vmoption</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#xFF0C;&#x66F4;&#x65B0;VM&#x8BCA;&#x65AD;&#x76F8;&#x5173;&#x7684;&#x53C2;&#x6570;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-11">&#x5B9E;&#x4F8B;</h3>

<p>&#x67E5;&#x770B;&#x6240;&#x6709;option</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>vmoption
 KEY                                   VALUE                                ORIGIN                                WRITEABLE                           
------------------------------------------------------------------------------------------------------------------------------------------------------
 HeapDumpBeforeFullGC                  <span class="token boolean">false</span>                                DEFAULT                               <span class="token boolean">true</span>                                
 HeapDumpAfterFullGC                   <span class="token boolean">false</span>                                DEFAULT                               <span class="token boolean">true</span>                                
 HeapDumpOnOutOfMemoryError            <span class="token boolean">false</span>                                DEFAULT                               <span class="token boolean">true</span>                                
 HeapDumpPath                                                               DEFAULT                               <span class="token boolean">true</span>                                

 PrintClassHistogram                   <span class="token boolean">false</span>                                DEFAULT                               <span class="token boolean">true</span>                                
 MinHeapFreeRatio                      40                                   DEFAULT                               <span class="token boolean">true</span>                                
 MaxHeapFreeRatio                      70                                   DEFAULT                               <span class="token boolean">true</span>                                
 PrintConcurrentLocks                  <span class="token boolean">false</span>                                DEFAULT                               <span class="token boolean">true</span>                                
 CMSAbortablePrecleanWaitMillis        100                                  DEFAULT                               <span class="token boolean">true</span>                                
 CMSWaitDuration                       2000                                 DEFAULT                               <span class="token boolean">true</span>                                
 CMSTriggerInterval                    -1                                   DEFAULT                               <span class="token boolean">true</span> 
</pre><p>&#x67E5;&#x770B;&#x6307;&#x5B9A;option</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>vmoption PrintClassHistogram
 KEY                                   VALUE                                ORIGIN                                WRITEABLE                           
------------------------------------------------------------------------------------------------------------------------------------------------------
 PrintClassHistogram                   <span class="token boolean">false</span>                                DEFAULT                               <span class="token boolean">true</span>                                
</pre><p>&#x66F4;&#x65B0;&#x6307;&#x5B9A;option</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>vmoption PrintClassHistogram <span class="token boolean">true</span>
Successfully updated the vm option.
PrintClassHistogram<span class="token operator">=</span>true
</pre><h2 class="mume-header" id="ognl">ognl</h2>

<blockquote>
<p>&#x6267;&#x884C;ognl&#x8868;&#x8FBE;&#x5F0F;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-2">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>express</code></td>
<td>&#x6267;&#x884C;&#x8868;&#x8FBE;&#x5F0F;</td>
</tr>
<tr>
<td><code>[c:]</code></td>
<td>&#x6267;&#x884C;&#x8868;&#x8FBE;&#x5F0F;&#x7684; ClassLoader &#x7684; hashcode&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;&#x662F;SystemClassLoader</td>
</tr>
<tr>
<td><code>[x]</code></td>
<td>&#x7ED3;&#x679C;&#x5BF9;&#x8C61;&#x7684;&#x5C55;&#x5F00;&#x5C42;&#x6B21;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;1</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E4%BD%BF%E7%94%A8%E5%8F%82%E8%80%83-1">&#x4F7F;&#x7528;&#x53C2;&#x8003;</h3>

<p>OGNL&#x7279;&#x6B8A;&#x7528;&#x6CD5;&#x8BF7;&#x53C2;&#x8003;&#xFF1A;<a href="https://github.com/alibaba/arthas/issues/71">https://github.com/alibaba/arthas/issues/71</a>
OGNL&#x8868;&#x8FBE;&#x5F0F;&#x5B98;&#x65B9;&#x6307;&#x5357;&#xFF1A;<a href="https://commons.apache.org/proper/commons-ognl/language-guide.html">https://commons.apache.org/proper/commons-ognl/language-guide.html</a></p>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-12">&#x5B9E;&#x4F8B;</h3>

<p>&#x8C03;&#x7528;&#x9759;&#x6001;&#x51FD;&#x6570;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>ognl <span class="token string">&apos;@java.lang.System@out.println(&quot;hello&quot;)&apos;</span>
null
$ 
</pre><p>&#x83B7;&#x53D6;&#x9759;&#x6001;&#x7C7B;&#x7684;&#x9759;&#x6001;&#x5B57;&#x6BB5;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>ognl <span class="token string">&apos;@demo.MathGame@random&apos;</span>
@Random<span class="token punctuation">[</span>
    serialVersionUID<span class="token operator">=</span>@Long<span class="token punctuation">[</span>3905348978240129619<span class="token punctuation">]</span>,
    seed<span class="token operator">=</span>@AtomicLong<span class="token punctuation">[</span>125451474443703<span class="token punctuation">]</span>,
    multiplier<span class="token operator">=</span>@Long<span class="token punctuation">[</span>25214903917<span class="token punctuation">]</span>,
    addend<span class="token operator">=</span>@Long<span class="token punctuation">[</span>11<span class="token punctuation">]</span>,
    mask<span class="token operator">=</span>@Long<span class="token punctuation">[</span>281474976710655<span class="token punctuation">]</span>,
    DOUBLE_UNIT<span class="token operator">=</span>@Double<span class="token punctuation">[</span>1.1102230246251565E-16<span class="token punctuation">]</span>,
    BadBound<span class="token operator">=</span>@String<span class="token punctuation">[</span>bound must be positive<span class="token punctuation">]</span>,
    BadRange<span class="token operator">=</span>@String<span class="token punctuation">[</span>bound must be greater than origin<span class="token punctuation">]</span>,
    BadSize<span class="token operator">=</span>@String<span class="token punctuation">[</span>size must be non-negative<span class="token punctuation">]</span>,
    seedUniquifier<span class="token operator">=</span>@AtomicLong<span class="token punctuation">[</span>-3282039941672302964<span class="token punctuation">]</span>,
    nextNextGaussian<span class="token operator">=</span>@Double<span class="token punctuation">[</span>0.0<span class="token punctuation">]</span>,
    haveNextNextGaussian<span class="token operator">=</span>@Boolean<span class="token punctuation">[</span>false<span class="token punctuation">]</span>,
    serialPersistentFields<span class="token operator">=</span>@ObjectStreamField<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">[</span>isEmpty<span class="token operator">=</span>false<span class="token punctuation">;</span>size<span class="token operator">=</span>3<span class="token punctuation">]</span>,
    unsafe<span class="token operator">=</span>@Unsafe<span class="token punctuation">[</span>sun.misc.Unsafe@28ea5898<span class="token punctuation">]</span>,
    seedOffset<span class="token operator">=</span>@Long<span class="token punctuation">[</span>24<span class="token punctuation">]</span>,
<span class="token punctuation">]</span>
</pre><p>&#x6267;&#x884C;&#x591A;&#x884C;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x8D4B;&#x503C;&#x7ED9;&#x4E34;&#x65F6;&#x53D8;&#x91CF;&#xFF0C;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;List&#xFF1A;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>ognl <span class="token string">&apos;#value1=@System@getProperty(&quot;java.home&quot;), #value2=@System@getProperty(&quot;java.runtime.name&quot;), {#value1, #value2}&apos;</span>
ognl <span class="token string">&apos;#value1=@System@getProperty(&quot;java.home&quot;), #value2=@System@getProperty(&quot;j 
ava.runtime.name&quot;), {#value1, #value2}&apos;</span>
@ArrayList<span class="token punctuation">[</span>
    @String<span class="token punctuation">[</span>C:\Program Files\Java\jdk1.8.0_201\jre<span class="token punctuation">]</span>,
    @String<span class="token punctuation">[</span>Java<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> SE Runtime Environment<span class="token punctuation">]</span>,
<span class="token punctuation">]</span>
$ 
</pre><h2 class="mume-header" id="getstatic">getstatic</h2>

<blockquote>
<p>&#x901A;&#x8FC7;getstatic&#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x65B9;&#x4FBF;&#x7684;&#x67E5;&#x770B;&#x7C7B;&#x7684;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x3002;&#x4F7F;&#x7528;&#x65B9;&#x6CD5;&#x4E3A;getstatic class_name field_name
&#x5982;&#x679C;&#x8BE5;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x662F;&#x4E00;&#x4E2A;&#x590D;&#x6742;&#x5BF9;&#x8C61;&#xFF0C;&#x8FD8;&#x53EF;&#x4EE5;&#x652F;&#x6301;&#x5728;&#x8BE5;&#x5C5E;&#x6027;&#x4E0A;&#x901A;&#x8FC7;ognl&#x8868;&#x793A;&#x8FDB;&#x884C;&#x904D;&#x5386;&#xFF0C;&#x8FC7;&#x6EE4;&#xFF0C;&#x8BBF;&#x95EE;&#x5BF9;&#x8C61;&#x7684;&#x5185;&#x90E8;&#x5C5E;&#x6027;&#x7B49;&#x64CD;&#x4F5C;&#x3002;</p>
</blockquote>
<p>&#x4F8B;&#x5982;&#xFF0C;&#x5047;&#x8BBE;map&#x662F;&#x4E00;&#x4E2A;Map&#xFF0C;Map&#x7684;Key&#x662F;&#x4E00;&#x4E2A;Enum&#xFF0C;&#x6211;&#x4EEC;&#x60F3;&#x8FC7;&#x6EE4;&#x51FA;Map&#x4E2D;Key&#x4E3A;&#x67D0;&#x4E2A;Enum&#x7684;&#x503C;&#xFF0C;&#x53EF;&#x4EE5;&#x5199;&#x5982;&#x4E0B;&#x547D;&#x4EE4;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span> getstatic qunar.tc.Test map <span class="token string">&apos;entrySet().iterator.{? #this.key.name()==&quot;STOP&quot;}&apos;</span>
field: n
@ArrayList<span class="token punctuation">[</span>
    @Node<span class="token punctuation">[</span>STOP<span class="token operator">=</span>bbb<span class="token punctuation">]</span>,
<span class="token punctuation">]</span>
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 68 ms.

root@local.example.com@bistoury:\<span class="token operator">&gt;</span> getstatic qunar.tc.Test map <span class="token string">&apos;entrySet().iterator.{? #this.key==&quot;a&quot;}&apos;</span>
field: m
@ArrayList<span class="token punctuation">[</span>
    @Node<span class="token punctuation">[</span>a<span class="token operator">=</span>aaa<span class="token punctuation">]</span>,
<span class="token punctuation">]</span>
</pre><h2 class="mume-header" id="heapdump">heapdump</h2>

<blockquote>
<p>dump java heap, &#x7C7B;&#x4F3C;jmap&#x547D;&#x4EE4;&#x7684;heap dump&#x529F;&#x80FD;&#x3002;<font color="red">&#x8BF7;&#x6458;&#x6389;&#x6D41;&#x91CF;&#x4F7F;&#x7528;</font></p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-13">&#x5B9E;&#x4F8B;</h3>

<p>dump&#x5230;&#x6307;&#x5B9A;&#x6587;&#x4EF6;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>heapdump /home/root/Desktop/bistoury-2.0.7/dump1.hprof
Dumping heap to /home/root/Desktop/bistoury-2.0.7/dump1.hprof<span class="token punctuation">..</span>.
Heap dump <span class="token function">file</span> created
</pre><p>&#x53EA;dump live &#x5BF9;&#x8C61;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>heapdump --live /home/root/Desktop/bistoury-2.0.7/dump2.hprof
Dumping heap to /home/root/Desktop/bistoury-2.0.7/dump2.hprof<span class="token punctuation">..</span>.
Heap dump <span class="token function">file</span> created
</pre><p>dump &#x5230;&#x4E34;&#x65F6;&#x6587;&#x4EF6;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>heapdump
Dumping heap to /var/folders/c5/yvdt09ls5xv2825vp_pqy4200000gn/T/heapdump2019-09-23-20-218597155241814313750.hprof<span class="token punctuation">..</span>.
Heap dump <span class="token function">file</span> created
</pre><h2 class="mume-header" id="logger">logger</h2>

<blockquote>
<p>&#x67E5;&#x770B;logger&#x4FE1;&#x606F;&#xFF0C;&#x66F4;&#x65B0;logger level</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-14">&#x5B9E;&#x4F8B;</h3>

<p>&#x4EE5;&#x4E0B;&#x9762;&#x7684;logbook.xml&#x4E3A;&#x4F8B;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml"><span class="token prolog">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>configuration</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>appender</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>APPLICATION<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ch.qos.logback.core.rolling.RollingFileAppender<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>file</span><span class="token punctuation">&gt;</span></span>app.log<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>file</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rollingPolicy</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>fileNamePattern</span><span class="token punctuation">&gt;</span></span>mylog-%d{yyyy-MM-dd}.%i.txt<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>fileNamePattern</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>maxFileSize</span><span class="token punctuation">&gt;</span></span>100MB<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>maxFileSize</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>maxHistory</span><span class="token punctuation">&gt;</span></span>60<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>maxHistory</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>totalSizeCap</span><span class="token punctuation">&gt;</span></span>2GB<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>totalSizeCap</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>rollingPolicy</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>encoder</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>pattern</span><span class="token punctuation">&gt;</span></span>%logger{35} - %msg%n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>pattern</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>encoder</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>appender</span><span class="token punctuation">&gt;</span></span>
 
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>appender</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ASYNC<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ch.qos.logback.classic.AsyncAppender<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>appender-ref</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>APPLICATION<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>appender</span><span class="token punctuation">&gt;</span></span>
 
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>appender</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>CONSOLE<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ch.qos.logback.core.ConsoleAppender<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>encoder</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>pattern</span><span class="token punctuation">&gt;</span></span>%-4relative [%thread] %-5level %logger{35} - %msg %n
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>pattern</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>charset</span><span class="token punctuation">&gt;</span></span>utf8<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>charset</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>encoder</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>appender</span><span class="token punctuation">&gt;</span></span>
 
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>root</span> <span class="token attr-name">level</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>INFO<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>appender-ref</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>CONSOLE<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>appender-ref</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ASYNC<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>root</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>configuration</span><span class="token punctuation">&gt;</span></span>
</pre><p>&#x4F7F;&#x7528;logger&#x547D;&#x4EE4;&#x6253;&#x5370;&#x7684;&#x7ED3;&#x679C;&#x662F;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>logger
 name                                   ROOT
 class                                  ch.qos.logback.classic.Logger
 classLoader                            sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
 classLoaderHash                        2a139a55
 level                                  INFO
 effectiveLevel                         INFO
 additivity                             <span class="token boolean">true</span>
 codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
 appenders                              name            CONSOLE
                                        class           ch.qos.logback.core.ConsoleAppender
                                        classLoader     sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
                                        classLoaderHash 2a139a55
                                        target          System.out
                                        name            APPLICATION
                                        class           ch.qos.logback.core.rolling.RollingFileAppender
                                        classLoader     sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
                                        classLoaderHash 2a139a55
                                        <span class="token function">file</span>            app.log
                                        name            ASYNC
                                        class           ch.qos.logback.classic.AsyncAppender
                                        classLoader     sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
                                        classLoaderHash 2a139a55
                                        appenderRef     <span class="token punctuation">[</span>APPLICATION<span class="token punctuation">]</span>
</pre><p>&#x4ECE;appenders&#x7684;&#x4FE1;&#x606F;&#x91CC;&#xFF0C;&#x53EF;&#x4EE5;&#x770B;&#x5230;</p>
<ul>
<li>CONSOLE logger&#x7684;target&#x662F;System.out</li>
<li>APPLICATION logger&#x662F;RollingFileAppender&#xFF0C;&#x5B83;&#x7684;file&#x662F;app.log</li>
<li>ASYNC&#x5B83;&#x7684;appenderRef&#x662F;APPLICATION&#xFF0C;&#x5373;&#x5F02;&#x6B65;&#x8F93;&#x51FA;&#x5230;&#x6587;&#x4EF6;&#x91CC;</li>
</ul>
<p>&#x67E5;&#x770B;&#x6307;&#x5B9A;&#x540D;&#x5B57;&#x7684;logger&#x4FE1;&#x606F;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>logger -n org.springframework.web
 name                                   org.springframework.web
 class                                  ch.qos.logback.classic.Logger
 classLoader                            sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
 classLoaderHash                        2a139a55
 level                                  null
 effectiveLevel                         INFO
 additivity                             <span class="token boolean">true</span>
 codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
</pre><p>&#x67E5;&#x770B;&#x6307;&#x5B9A;classloader&#x7684;logger&#x4FE1;&#x606F;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>logger -c 2a139a55
 name                                   ROOT
 class                                  ch.qos.logback.classic.Logger
 classLoader                            sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
 classLoaderHash                        2a139a55
 level                                  DEBUG
 effectiveLevel                         DEBUG
 additivity                             <span class="token boolean">true</span>
 codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
 appenders                              name            CONSOLE
                                        class           ch.qos.logback.core.ConsoleAppender
                                        classLoader     sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
                                        classLoaderHash 2a139a55
                                        target          System.out
                                        name            APPLICATION
                                        class           ch.qos.logback.core.rolling.RollingFileAppender
                                        classLoader     sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
                                        classLoaderHash 2a139a55
                                        <span class="token function">file</span>            app.log
                                        name            ASYNC
                                        class           ch.qos.logback.classic.AsyncAppender
                                        classLoader     sun.misc.Launcher<span class="token variable">$AppClassLoader@2a139a55</span>
                                        classLoaderHash 2a139a55
                                        appenderRef     <span class="token punctuation">[</span>APPLICATION<span class="token punctuation">]</span>

</pre><p>&#x66F4;&#x65B0;logger level</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>logger --name ROOT --level debug
update logger level success.
</pre><h2 class="mume-header" id="qjdump">qjdump</h2>

<blockquote>
<p>qjdump&#x662F;&#x7EBF;&#x4E0A;JVM&#x6570;&#x636E;&#x7D27;&#x6025;&#x6536;&#x96C6;&#x811A;&#x672C;&#x3002;&#x5B83;&#x53EF;&#x4EE5;&#x5728;<font color="red">&#x7D27;&#x6025;&#x573A;&#x666F;</font>&#x4E0B;&#xFF08;&#x6BD4;&#x5982;&#x9A6C;&#x4E0A;&#x8981;&#x5BF9;&#x8FDB;&#x7A0B;&#x8FDB;&#x884C;&#x91CD;&#x542F;&#xFF09;&#xFF0C;&#x4E00;&#x952E;&#x6536;&#x96C6;jstack&#x3001;jmap&#x4EE5;&#x53CA;GC&#x65E5;&#x5FD7;&#x7B49;&#x76F8;&#x5173;&#x4FE1;&#x606F;&#xFF0C;&#x5E76;&#x4EE5;zip&#x5305;&#x4FDD;&#x5B58;(&#x9ED8;&#x8BA4;&#x5728;&#x76EE;&#x5F55;/tmp/bistoury/qjtools/qjdump/${PID}&#x4E0B;)&#xFF0C;&#x4FDD;&#x8BC1;&#x5728;&#x7D27;&#x6025;&#x60C5;&#x51B5;&#x4E0B;&#x4ECD;&#x80FD;&#x6536;&#x96C6;&#x8DB3;&#x591F;&#x7684;&#x95EE;&#x9898;&#x6392;&#x67E5;&#x4FE1;&#x606F;&#xFF0C;&#x51CF;&#x8F7B;&#x8FD0;&#x7EF4;&#x56E2;&#x961F;&#x7684;&#x5DE5;&#x4F5C;&#x91CF;&#xFF0C;&#x4EE5;&#x53CA;&#x4E0E;&#x5F00;&#x53D1;&#x56E2;&#x961F;&#x7684;&#x6C9F;&#x901A;&#x6210;&#x672C;&#x3002;</p>
</blockquote>
<p>&#x6536;&#x96C6;&#x6570;&#x636E;&#x5305;&#x62EC;&#xFF1A;</p>
<blockquote>
<ul>
<li>thread dump&#x6570;&#x636E;&#xFF1A;jstack -l $PID</li>
<li>jinfo -flags $PID</li>
<li>jmap histo &#x5806;&#x5BF9;&#x8C61;&#x7EDF;&#x8BA1;&#x6570;&#x636E;&#xFF1A;jmap -histo $PID &amp; jmap -histo:live $PID</li>
<li>GC&#x65E5;&#x5FD7;(&#x5982;&#x679C;JVM&#x6709;&#x8BBE;&#x5B9A;GC&#x65E5;&#x5FD7;&#x8F93;&#x51FA;)</li>
<li>heap dump&#x6570;&#x636E;&#xFF08;&#x9700;&#x6307;&#x5B9A;--liveheap&#x5F00;&#x542F;&#xFF09;&#xFF1A;jmap -dump:live,format=b,file=${DUMP_FILE} $PID</li>
</ul>
</blockquote>
<p>&#x6267;&#x884C;&#x547D;&#x4EE4;&#x540E;&#xFF0C;&#x53EF;&#x4EE5;&#x767B;&#x5F55;&#x673A;&#x5668;&#xFF0C;&#x53BB;&#x6267;&#x884C;&#x7ED3;&#x679C;&#x4E2D;&#x63D0;&#x793A;&#x7684;&#x76EE;&#x5F55;&#x4E0B;&#x8F7D;zip&#x6587;&#x4EF6;&#x3002;</p>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-15">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell"><span class="token comment"># &#x5BF9;&#x5E94;&#x7528;&#x8FDB;&#x884C;&#x6025;&#x8BCA;</span>
qjdump
<span class="token comment"># &#x989D;&#x5916;&#x6536;&#x96C6;heap dump&#x4FE1;&#x606F;&#xFF08;jmap -dump:live&#x7684;&#x4FE1;&#x606F;&#xFF09;</span>
qjdump --liveheap
</pre><h2 class="mume-header" id="qjtop">qjtop</h2>

<p>Bistoury &#x4E0D;&#x518D;&#x652F;&#x6301; qjtop &#x547D;&#x4EE4;&#xFF0C;&#x53EF;&#x5230;&#x4E3B;&#x673A;&#x4FE1;&#x606F;&#x9875;&#x9762;&#x67E5;&#x770B; JVM &#x6307;&#x6807;&#x53CA;&#x7E41;&#x5FD9;&#x7EBF;&#x7A0B;</p>
<h2 class="mume-header" id="qjmap">qjmap</h2>

<p>Bistoury &#x4E0D;&#x518D;&#x652F;&#x6301; qjmap &#x547D;&#x4EE4;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528; <a href="#heapdump">heapdump</a> &#x547D;&#x4EE4; dump &#x5185;&#x5B58;&#x4FE1;&#x606F;</p>
<h2 class="mume-header" id="qjmxcli">qjmxcli</h2>

<p>Bistoury &#x4E0D;&#x518D;&#x652F;&#x6301; qjmxcli &#x547D;&#x4EE4;&#xFF0C;&#x8BF7;&#x4F7F;&#x7528; mbean &#x547D;&#x4EE4;&#x67E5;&#x770B; <a href="#mbean">MBean</a> &#x4FE1;&#x606F;&#xFF0C;&#x4F7F;&#x7528; <a href="#jstat">jstat</a> &#x547D;&#x4EE4;&#x67E5;&#x770B; GC &#x4FE1;&#x606F;</p>
<h2 class="mume-header" id="sc">sc</h2>

<blockquote>
<p>&#x67E5;&#x770B;JVM&#x5DF2;&#x52A0;&#x8F7D;&#x7684;&#x7C7B;&#x4FE1;&#x606F;
&#x201C;Search-Class&#x201D; &#x7684;&#x7B80;&#x5199;&#xFF0C;&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x80FD;&#x641C;&#x7D22;&#x51FA;&#x6240;&#x6709;&#x5DF2;&#x7ECF;&#x52A0;&#x8F7D;&#x5230; JVM &#x4E2D;&#x7684; Class &#x4FE1;&#x606F;&#xFF0C;&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x652F;&#x6301;&#x7684;&#x53C2;&#x6570;&#x6709; [d]&#x3001;[E]&#x3001;[f] &#x548C; [x:]&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-3">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>method-pattern</td>
<td>&#x65B9;&#x6CD5;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[d]</td>
<td>&#x8F93;&#x51FA;&#x5F53;&#x524D;&#x7C7B;&#x7684;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x5305;&#x62EC;&#x8FD9;&#x4E2A;&#x7C7B;&#x6240;&#x52A0;&#x8F7D;&#x7684;&#x539F;&#x59CB;&#x6587;&#x4EF6;&#x6765;&#x6E90;&#x3001;&#x7C7B;&#x7684;&#x58F0;&#x660E;&#x3001;&#x52A0;&#x8F7D;&#x7684;ClassLoader&#x7B49;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#x3002;&#x5982;&#x679C;&#x4E00;&#x4E2A;&#x7C7B;&#x88AB;&#x591A;&#x4E2A;ClassLoader&#x6240;&#x52A0;&#x8F7D;&#xFF0C;&#x5219;&#x4F1A;&#x51FA;&#x73B0;&#x591A;&#x6B21;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[f]</td>
<td>&#x8F93;&#x51FA;&#x5F53;&#x524D;&#x7C7B;&#x7684;&#x6210;&#x5458;&#x53D8;&#x91CF;&#x4FE1;&#x606F;&#xFF08;&#x9700;&#x8981;&#x914D;&#x5408;&#x53C2;&#x6570;-d&#x4E00;&#x8D77;&#x4F7F;&#x7528;&#xFF09;</td>
</tr>
<tr>
<td>[x:]</td>
<td>&#x6307;&#x5B9A;&#x8F93;&#x51FA;&#x9759;&#x6001;&#x53D8;&#x91CF;&#x65F6;&#x5C5E;&#x6027;&#x7684;&#x904D;&#x5386;&#x6DF1;&#x5EA6;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A; 0&#xFF0C;&#x5373;&#x76F4;&#x63A5;&#x4F7F;&#x7528; toString &#x8F93;&#x51FA;</td>
</tr>
</tbody>
</table>
<blockquote>
<p>class-pattern&#x652F;&#x6301;&#x5168;&#x9650;&#x5B9A;&#x540D;&#xFF0C;&#x5982;com.qunar.test.AAA&#xFF0C;&#x4E5F;&#x652F;&#x6301;com/qunar/test/AAA&#x8FD9;&#x6837;&#x7684;&#x683C;&#x5F0F;&#xFF0C;&#x8FD9;&#x6837;&#xFF0C;&#x6211;&#x4EEC;&#x4ECE;&#x5F02;&#x5E38;&#x5806;&#x6808;&#x91CC;&#x9762;&#x628A;&#x7C7B;&#x540D;&#x62F7;&#x8D1D;&#x8FC7;&#x6765;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x5728;&#x624B;&#x52A8;&#x628A;/&#x66FF;&#x6362;&#x4E3A;.&#x5566;&#x3002;
sc &#x9ED8;&#x8BA4;&#x5F00;&#x542F;&#x4E86;&#x5B50;&#x7C7B;&#x5339;&#x914D;&#x529F;&#x80FD;&#xFF0C;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#x6240;&#x6709;&#x5F53;&#x524D;&#x7C7B;&#x7684;&#x5B50;&#x7C7B;&#x4E5F;&#x4F1A;&#x88AB;&#x641C;&#x7D22;&#x51FA;&#x6765;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-16">&#x5B9E;&#x4F8B;</h3>

<p>&#x67E5;&#x770B;&#x7C7B;&#x7684;&#x9759;&#x6001;&#x53D8;&#x91CF;&#x4FE1;&#x606F;&#xFF0C; &#x53EF;&#x4EE5;&#x7528;sc -df class-name</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sc -df org.apache.commons.lang.StringUtils
 class-info        org.apache.commons.lang.StringUtils                          
 code-source       /home/user/tomcat/www/qconfig-admin/webapps/ROOT/WEB-INF/lib/commons-l
                   ang-2.5.jar                                                  
 name              org.apache.commons.lang.StringUtils                          
 isInterface       <span class="token boolean">false</span>                                                        
 isAnnotation      <span class="token boolean">false</span>                                                        
 isEnum            <span class="token boolean">false</span>                                                        
 isAnonymousClass  <span class="token boolean">false</span>                                                        
 isArray           <span class="token boolean">false</span>                                                        
 isLocalClass      <span class="token boolean">false</span>                                                        
 isMemberClass     <span class="token boolean">false</span>                                                        
 isPrimitive       <span class="token boolean">false</span>                                                        
 isSynthetic       <span class="token boolean">false</span>                                                        
 simple-name       StringUtils                                                  
 modifier          public                                                       
 annotation                                                                     
 interfaces                                                                     
 super-class       +-java.lang.Object                                           
 class-loader      +-WebappClassLoader                                          
                       context:                                                 
                       delegate: <span class="token boolean">false</span>                                          
                       repositories:                                            
                         /WEB-INF/classes/                                      
                     ----------<span class="token operator">&gt;</span> Parent Classloader:                            
                     org.apache.catalina.loader.StandardClassLoader@4b7d94f8    

                     +-org.apache.catalina.loader.StandardClassLoader@4b7d94f8  
                       +-sun.misc.Launcher<span class="token variable">$AppClassLoader@23137792</span>              
                         +-sun.misc.Launcher<span class="token variable">$ExtClassLoader@530f243b</span>            
 classLoaderHash   711a924b                                                     
 fields            modifierfinal,public,static                                  
                   <span class="token function">type</span>    java.lang.String                                     
                   name    EMPTY                                                
                   value                                                        

                   modifierfinal,public,static                                  
                   <span class="token function">type</span>    int                                                  
                   name    INDEX_NOT_FOUND                                      
                   value   -1                                                   

                   modifierfinal,private,static                                 
                   <span class="token function">type</span>    int                                                  
                   name    PAD_LIMIT                                            
                   value   8192                                                 


Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 56 ms.
</pre><h2 class="mume-header" id="sm">sm</h2>

<blockquote>
<p>&#x67E5;&#x770B;&#x5DF2;&#x52A0;&#x8F7D;&#x7C7B;&#x7684;&#x65B9;&#x6CD5;&#x4FE1;&#x606F;
&#x201C;Search-Method&#x201D; &#x7684;&#x7B80;&#x5199;&#xFF0C;&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x80FD;&#x641C;&#x7D22;&#x51FA;&#x6240;&#x6709;&#x5DF2;&#x7ECF;&#x52A0;&#x8F7D;&#x4E86; Class &#x4FE1;&#x606F;&#x7684;&#x65B9;&#x6CD5;&#x4FE1;&#x606F;&#x3002;
sm &#x547D;&#x4EE4;&#x53EA;&#x80FD;&#x770B;&#x5230;&#x7531;&#x5F53;&#x524D;&#x7C7B;&#x6240;&#x58F0;&#x660E; (declaring) &#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x7236;&#x7C7B;&#x5219;&#x65E0;&#x6CD5;&#x770B;&#x5230;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-4">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>method-pattern</td>
<td>&#x65B9;&#x6CD5;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[d]</td>
<td>&#x5C55;&#x793A;&#x6BCF;&#x4E2A;&#x65B9;&#x6CD5;&#x7684;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-17">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sm org.apache.catalina.connector.Connector
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span><span class="token operator">&lt;</span>init<span class="token operator">&gt;</span>
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setProperty
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getProperty
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>toString
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>resume
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getScheme
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getProtocol
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getPort
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setService
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setPort
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getService
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getAttribute
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setAttribute
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getLocalPort
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>pause
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setProtocol
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>initInternal
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setSecure
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getSecure
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>startInternal
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>stopInternal
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setScheme
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>createRequest
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getDomainInternal
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getProtocolHandler
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setURIEncoding
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>findSslHostConfigs
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>destroyInternal
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getObjectNameKeyProperties
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getAllowTrace
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setAllowTrace
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getAsyncTimeout
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setAsyncTimeout
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getEnableLookups
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>setEnableLookups
org.apache.catalina.connector.Connector-<span class="token operator">&gt;</span>getMaxCookieCount
<span class="token punctuation">..</span>.
</pre><pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>sm org.apache.catalina.connector.Connector -d
 declaring-class   org.apache.catalina.connector.Connector
 constructor-name  <span class="token operator">&lt;</span>init<span class="token operator">&gt;</span>
 modifier          public
 annotation
 parameters
 exceptions

 declaring-class   org.apache.catalina.connector.Connector
 constructor-name  <span class="token operator">&lt;</span>init<span class="token operator">&gt;</span>
 modifier          public
 annotation
 parameters        java.lang.String
 exceptions

 declaring-class  org.apache.catalina.connector.Connector
 method-name      setProperty
 modifier         public
 annotation
 parameters       java.lang.String
                  java.lang.String
 <span class="token keyword">return</span>           boolean
 exceptions
 <span class="token punctuation">..</span><span class="token punctuation">..</span><span class="token punctuation">..</span>
</pre><h2 class="mume-header" id="dump">dump</h2>

<blockquote>
<p>dump &#x5DF2;&#x52A0;&#x8F7D;&#x7C7B;&#x7684; bytecode &#x5230;&#x7279;&#x5B9A;&#x76EE;&#x5F55;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-5">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[c:]</td>
<td>&#x7C7B;&#x6240;&#x5C5E; ClassLoader &#x7684; hashcode</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
</tbody>
</table>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>dump -E org.apache.commons.lang.StringUtils
 HASHCODE  CLASSLOADER                                                  LOCATIO
                                                                        N       
 711a924b  +-WebappClassLoader                                          /home/t
               context:                                                 omcat/l
               delegate: <span class="token boolean">false</span>                                          ogs/art
               repositories:                                            has/cla
                 /WEB-INF/classes/                                      ssdump/
             ----------<span class="token operator">&gt;</span> Parent Classloader:                            org.apa
             org.apache.catalina.loader.StandardClassLoader@4b7d94f8    che.cat
                                                                        alina.l
             +-org.apache.catalina.loader.StandardClassLoader@4b7d94f8  oader.W
               +-sun.misc.Launcher<span class="token variable">$AppClassLoader@23137792</span>              ebappCl
                 +-sun.misc.Launcher<span class="token variable">$ExtClassLoader@530f243b</span>            assLoad
                                                                        er-711a
                                                                        924b/or
                                                                        g/apach
                                                                        e/commo
                                                                        ns/lang
                                                                        /String
                                                                        Utils.c
                                                                        lass    
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 49 ms.
</pre><h2 class="mume-header" id="redefine">redefine</h2>

<blockquote>
<p>&#x52A0;&#x8F7D;&#x5916;&#x90E8;&#x7684;.class&#x6587;&#x4EF6;&#xFF0C;redefine jvm&#x5DF2;&#x52A0;&#x8F7D;&#x7684;&#x7C7B;</p>
</blockquote>
<p><font color="red">&#x6CE8;&#x610F;&#xFF1A;</font>redefine&#x540E;&#x7684;&#x539F;&#x6765;&#x7684;&#x7C7B;&#x4E0D;&#x80FD;&#x6062;&#x590D;&#xFF0C;redefine&#x6709;&#x53EF;&#x80FD;&#x5931;&#x8D25;&#xFF08;&#x6BD4;&#x5982;&#x589E;&#x52A0;&#x4E86;&#x65B0;&#x7684;field&#xFF09;&#xFF0C;&#x53C2;&#x8003;jdk&#x672C;&#x8EAB;&#x7684;&#x6587;&#x6863;&#x3002;</p>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-6">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>[c:]</td>
<td>ClassLoader&#x7684;hashcode</td>
</tr>
<tr>
<td>[p:]</td>
<td>&#x5916;&#x90E8;&#x7684;.class&#x6587;&#x4EF6;&#x7684;&#x5B8C;&#x6574;&#x8DEF;&#x5F84;&#xFF0C;&#x652F;&#x6301;&#x591A;&#x4E2A;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-18">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>redefine -p /Test.class
redefine -p /Test.class
redefine success, size: 0
</pre><h2 class="mume-header" id="mc">mc</h2>

<blockquote>
<p>Memory Compiler/&#x5185;&#x5B58;&#x7F16;&#x8BD1;&#x5668;&#xFF0C;&#x7F16;&#x8BD1;.java&#x6587;&#x4EF6;&#x751F;&#x6210;.class&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-19">&#x5B9E;&#x4F8B;</h3>

<p>&#x7F16;&#x8BD1;&#x7C7B;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell"><span class="token function">mc</span> /tmp/Test.java
</pre><p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>-c</code>&#x53C2;&#x6570;&#x6307;&#x5B9A;classloader</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell"><span class="token function">mc</span> -c 32ba647b /tmp/Test.java
</pre><p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7;-d&#x547D;&#x4EE4;&#x6307;&#x5B9A;&#x8F93;&#x51FA;&#x76EE;&#x5F55;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell"><span class="token function">mc</span> -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
</pre><p>&#x7F16;&#x8BD1;&#x751F;&#x6210;.class&#x6587;&#x4EF6;&#x4E4B;&#x540E;&#xFF0C;&#x53EF;&#x4EE5;&#x7ED3;&#x5408;<a href="#redefine">redefine</a>&#x547D;&#x4EE4;&#x5B9E;&#x73B0;&#x70ED;&#x66F4;&#x65B0;&#x4EE3;&#x7801;&#x3002;</p>
<p><font color="red">&#x6CE8;&#x610F;</font>&#xFF1A;mc&#x547D;&#x4EE4;&#x6709;&#x53EF;&#x80FD;&#x5931;&#x8D25;&#x3002;&#x5982;&#x679C;&#x7F16;&#x8BD1;&#x5931;&#x8D25;&#x53EF;&#x4EE5;&#x5728;&#x672C;&#x5730;&#x7F16;&#x8BD1;&#x597D;.class&#x6587;&#x4EF6;&#xFF0C;&#x518D;&#x4E0A;&#x4F20;&#x5230;&#x670D;&#x52A1;&#x5668;&#x3002;&#x5177;&#x4F53;&#x53C2;&#x8003;<a href="#redefine">redefine</a>&#x547D;&#x4EE4;&#x8BF4;&#x660E;&#x3002;</p>
<h2 class="mume-header" id="jad">jad</h2>

<blockquote>
<p>&#x53CD;&#x7F16;&#x8BD1;&#x6307;&#x5B9A;&#x5DF2;&#x52A0;&#x8F7D;&#x7C7B;&#x7684;&#x6E90;&#x7801;
jad &#x547D;&#x4EE4;&#x5C06; JVM &#x4E2D;&#x5B9E;&#x9645;&#x8FD0;&#x884C;&#x7684; class &#x7684; byte code &#x53CD;&#x7F16;&#x8BD1;&#x6210; java &#x4EE3;&#x7801;&#xFF0C;&#x4FBF;&#x4E8E;&#x4F60;&#x7406;&#x89E3;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#xFF1B;
&#x5F53;&#x7136;&#xFF0C;&#x53CD;&#x7F16;&#x8BD1;&#x51FA;&#x6765;&#x7684; java &#x4EE3;&#x7801;&#x53EF;&#x80FD;&#x4F1A;&#x5B58;&#x5728;&#x8BED;&#x6CD5;&#x9519;&#x8BEF;&#xFF0C;&#x4F46;&#x4E0D;&#x5F71;&#x54CD;&#x4F60;&#x8FDB;&#x884C;&#x9605;&#x8BFB;&#x7406;&#x89E3;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-7">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[c:]</td>
<td>&#x7C7B;&#x6240;&#x5C5E; ClassLoader &#x7684; hashcode</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
</tbody>
</table>
<blockquote>
<p>&#x5F53;&#x6709;&#x591A;&#x4E2A; ClassLoader &#x90FD;&#x52A0;&#x8F7D;&#x4E86;&#x8FD9;&#x4E2A;&#x7C7B;&#x65F6;&#xFF0C;jad &#x547D;&#x4EE4;&#x4F1A;&#x8F93;&#x51FA;&#x5BF9;&#x5E94; ClassLoader &#x5B9E;&#x4F8B;&#x7684; hashcode&#xFF0C;&#x7136;&#x540E;&#x4F60;&#x53EA;&#x9700;&#x8981;&#x91CD;&#x65B0;&#x6267;&#x884C; jad &#x547D;&#x4EE4;&#xFF0C;&#x5E76;&#x4F7F;&#x7528;&#x53C2;&#x6570; -c <hashcode> &#x5C31;&#x53EF;&#x4EE5;&#x53CD;&#x7F16;&#x8BD1;&#x6307;&#x5B9A; ClassLoader &#x52A0;&#x8F7D;&#x7684;&#x90A3;&#x4E2A;&#x7C7B;&#x4E86;&#xFF1B;</hashcode></p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-20">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="java" class="language-java">root<span class="token annotation punctuation">@local</span><span class="token punctuation">.</span>example<span class="token punctuation">.</span>com<span class="token annotation punctuation">@bistoury</span><span class="token operator">:</span>\<span class="token operator">&gt;</span>jad org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>log4j<span class="token punctuation">.</span><span class="token class-name">Logger</span>

<span class="token class-name">ClassLoader</span><span class="token operator">:</span>                                                                    
<span class="token operator">+</span><span class="token operator">-</span><span class="token class-name">WebappClassLoader</span>                                                             
    context<span class="token operator">:</span>                                                                    
    delegate<span class="token operator">:</span> <span class="token boolean">false</span>                                                             
    repositories<span class="token operator">:</span>                                                               
      <span class="token operator">/</span>WEB<span class="token operator">-</span>INF<span class="token operator">/</span>classes<span class="token operator">/</span>                                                         
  <span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">&gt;</span> <span class="token class-name">Parent</span> <span class="token class-name">Classloader</span><span class="token operator">:</span>                                               
  org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>catalina<span class="token punctuation">.</span>loader<span class="token punctuation">.</span><span class="token class-name">StandardClassLoader</span><span class="token annotation punctuation">@4b7d94f8</span>                       

  <span class="token operator">+</span><span class="token operator">-</span>org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>catalina<span class="token punctuation">.</span>loader<span class="token punctuation">.</span><span class="token class-name">StandardClassLoader</span><span class="token annotation punctuation">@4b7d94f8</span>                     
    <span class="token operator">+</span><span class="token operator">-</span>sun<span class="token punctuation">.</span>misc<span class="token punctuation">.</span><span class="token class-name">Launcher</span>$<span class="token class-name">AppClassLoader</span><span class="token annotation punctuation">@23137792</span>                                 
      <span class="token operator">+</span><span class="token operator">-</span>sun<span class="token punctuation">.</span>misc<span class="token punctuation">.</span><span class="token class-name">Launcher</span>$<span class="token class-name">ExtClassLoader</span><span class="token annotation punctuation">@530f243b</span>                               

<span class="token class-name">Location</span><span class="token operator">:</span>                                                                       
<span class="token operator">/</span>home<span class="token operator">/</span>user<span class="token operator">/</span>tomcat<span class="token operator">/</span>www<span class="token operator">/</span>qconfig<span class="token operator">-</span>admin<span class="token operator">/</span>webapps<span class="token operator">/</span>ROOT<span class="token operator">/</span>WEB<span class="token operator">-</span>INF<span class="token operator">/</span>lib<span class="token operator">/</span>log4j<span class="token operator">-</span>over<span class="token operator">-</span>slf4j<span class="token operator">-</span><span class="token number">1.7</span><span class="token number">.5</span><span class="token punctuation">.</span>jar   

<span class="token comment">/*
 * Decompiled with CFR 0_132.
 */</span>
<span class="token keyword">package</span> <span class="token namespace">org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>log4j</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>log4j</span><span class="token punctuation">.</span><span class="token class-name">Category</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>log4j</span><span class="token punctuation">.</span><span class="token class-name">Log4jLoggerFactory</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>log4j<span class="token punctuation">.</span>spi</span><span class="token punctuation">.</span><span class="token class-name">LoggerFactory</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>slf4j</span><span class="token punctuation">.</span><span class="token class-name">Marker</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Logger</span>
<span class="token keyword">extends</span> <span class="token class-name">Category</span> <span class="token punctuation">{</span>
    <span class="token keyword">private</span> <span class="token keyword">static</span> <span class="token keyword">final</span> <span class="token class-name">String</span> LOGGER_FQCN <span class="token operator">=</span> <span class="token class-name">Logger</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">Logger</span> <span class="token function">getRootLogger</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token class-name">Log4jLoggerFactory</span><span class="token punctuation">.</span><span class="token function">getLogger</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">)</span><span class="token string">&quot;ROOT&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">boolean</span> <span class="token function">isTraceEnabled</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>slf4jLogger<span class="token punctuation">.</span><span class="token function">isTraceEnabled</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">protected</span> <span class="token class-name">Logger</span><span class="token punctuation">(</span><span class="token class-name">String</span> name<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">super</span><span class="token punctuation">(</span>name<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">Logger</span> <span class="token function">getLogger</span><span class="token punctuation">(</span><span class="token class-name">Class</span> clazz<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token class-name">Logger</span><span class="token punctuation">.</span><span class="token function">getLogger</span><span class="token punctuation">(</span>clazz<span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">Logger</span> <span class="token function">getLogger</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token class-name">String</span> name<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token class-name">Log4jLoggerFactory</span><span class="token punctuation">.</span><span class="token function">getLogger</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token class-name">String</span><span class="token punctuation">)</span>name<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token class-name">Logger</span> <span class="token function">getLogger</span><span class="token punctuation">(</span><span class="token class-name">String</span> name<span class="token punctuation">,</span> <span class="token class-name">LoggerFactory</span> loggerFactory<span class="token punctuation">)</span> <span class="token punctuation">[</span><span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token class-name">Log4jLoggerFactory</span><span class="token punctuation">.</span><span class="token function">getLogger</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">)</span>name<span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token class-name">LoggerFactory</span><span class="token punctuation">)</span>loggerFactory<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">trace</span><span class="token punctuation">(</span><span class="token class-name">Object</span> message<span class="token punctuation">,</span> <span class="token class-name">Throwable</span> t<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">differentiatedLog</span><span class="token punctuation">(</span><span class="token keyword">null</span><span class="token punctuation">,</span> LOGGER_FQCN<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> message<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">trace</span><span class="token punctuation">(</span><span class="token class-name">Object</span> message<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">differentiatedLog</span><span class="token punctuation">(</span><span class="token keyword">null</span><span class="token punctuation">,</span> LOGGER_FQCN<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> message<span class="token punctuation">,</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</pre><h2 class="mume-header" id="classloader">classloader</h2>

<blockquote>
<p>&#x67E5;&#x770B;classloader&#x7684;&#x7EE7;&#x627F;&#x6811;&#xFF0C;urls&#xFF0C;&#x7C7B;&#x52A0;&#x8F7D;&#x4FE1;&#x606F;
classloader &#x547D;&#x4EE4;&#x5C06; JVM &#x4E2D;&#x6240;&#x6709;&#x7684;classloader&#x7684;&#x4FE1;&#x606F;&#x7EDF;&#x8BA1;&#x51FA;&#x6765;&#xFF0C;&#x5E76;&#x53EF;&#x4EE5;&#x5C55;&#x793A;&#x7EE7;&#x627F;&#x6811;&#xFF0C;urls&#x7B49;&#x3002;
&#x53EF;&#x4EE5;&#x8BA9;&#x6307;&#x5B9A;&#x7684;classloader&#x53BB;getResources&#xFF0C;&#x6253;&#x5370;&#x51FA;&#x6240;&#x6709;&#x67E5;&#x627E;&#x5230;&#x7684;resources&#x7684;url&#x3002;&#x5BF9;&#x4E8E;ResourceNotFoundException&#x6BD4;&#x8F83;&#x6709;&#x7528;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-8">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>[l]</td>
<td>&#x6309;&#x7C7B;&#x52A0;&#x8F7D;&#x5B9E;&#x4F8B;&#x8FDB;&#x884C;&#x7EDF;&#x8BA1;</td>
</tr>
<tr>
<td>[t]</td>
<td>&#x6253;&#x5370;&#x6240;&#x6709;ClassLoader&#x7684;&#x7EE7;&#x627F;&#x6811;</td>
</tr>
<tr>
<td>[a]</td>
<td>&#x5217;&#x51FA;&#x6240;&#x6709;ClassLoader&#x52A0;&#x8F7D;&#x7684;&#x7C7B;&#xFF0C;&#x8BF7;&#x8C28;&#x614E;&#x4F7F;&#x7528;</td>
</tr>
<tr>
<td>[c:]</td>
<td>ClassLoader&#x7684;hashcode</td>
</tr>
<tr>
<td>[c: r:]</td>
<td>&#x7528;ClassLoader&#x53BB;&#x67E5;&#x627E;resource</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-21">&#x5B9E;&#x4F8B;</h3>

<p>&#x6309;&#x7C7B;&#x52A0;&#x8F7D;&#x7C7B;&#x578B;&#x67E5;&#x770B;&#x7EDF;&#x8BA1;&#x4FE1;&#x606F;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>classloader
 name                                            numberOfInstances  loadedCountTotal   
 org.apache.catalina.loader.WebappClassLoader    1                  6279        
 BootstrapClassLoader                            1                  2977        
 com.taobao.arthas.agent.ArthasClassloader       1                  1710        
 org.apache.catalina.loader.StandardClassLoader  1                  721         
 sun.reflect.DelegatingClassLoader               177                177         
 sun.misc.Launcher<span class="token variable">$AppClassLoader</span>                1                  27          
 sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>                1                  5   
</pre><p>&#x6309;&#x7C7B;&#x52A0;&#x8F7D;&#x5B9E;&#x4F8B;&#x67E5;&#x770B;&#x7EDF;&#x8BA1;&#x4FE1;&#x606F;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>classloader -l
 name                                                     loadedCount  <span class="token function">hash</span>     
 BootstrapClassLoader                                     2977         null     
 com.taobao.arthas.agent.ArthasClassloader@3409d1b1       1713         3409d1b1
 org.apache.catalina.loader.StandardClassLoader@4b7d94f8  721          4b7d94f8
 WebappClassLoader                                        6279         77ab3f0  
   context:                                                                     
   delegate: <span class="token boolean">false</span>                                                              
   repositories:                                                                
     /WEB-INF/classes/                                                          
 ----------<span class="token operator">&gt;</span> Parent Classloader:                                                
 org.apache.catalina.loader.StandardClassLoader@4b7d94f8                        

 sun.misc.Launcher<span class="token variable">$AppClassLoader@23137792</span>                27           23137792
 sun.misc.Launcher<span class="token variable">$ExtClassLoader@530f243b</span>                5            530f243b
</pre><p>&#x67E5;&#x770B;ClassLoader&#x7684;&#x7EE7;&#x627F;&#x6811;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>classloader -t
+-BootstrapClassLoader                                                          
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader@530f243b</span>                                     
  +-com.taobao.arthas.agent.ArthasClassloader@3409d1b1                          
  +-sun.misc.Launcher<span class="token variable">$AppClassLoader@23137792</span>                                   
    +-org.apache.catalina.loader.StandardClassLoader@4b7d94f8                   
      +-WebappClassLoader                                                       
          context:                                                              
          delegate: <span class="token boolean">false</span>                                                       
          repositories:                                                         
            /WEB-INF/classes/                                                   
        ----------<span class="token operator">&gt;</span> Parent Classloader:                                         
        org.apache.catalina.loader.StandardClassLoader@4b7d94f8    
</pre><p>&#x67E5;&#x770B;URLClassLoader&#x5B9E;&#x9645;&#x7684;urls</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>classloader -c 4b7d94f8
file:/home/user/tomcat/tomcat/lib/                                                        
file:/home/user/tomcat/tomcat/lib/ecj-4.2.2.jar                                           
file:/home/user/tomcat/tomcat/lib/servlet-api.jar                                         
file:/home/user/tomcat/tomcat/lib/websocket-api.jar                                       
file:/home/user/tomcat/tomcat/lib/tomcat-util.jar                                         
file:/home/user/tomcat/tomcat/lib/tomcat7-websocket.jar                                   
file:/home/user/tomcat/tomcat/lib/el-api.jar                                              
file:/home/user/tomcat/tomcat/lib/tomcat-jdbc.jar                                         
file:/home/user/tomcat/tomcat/lib/jsp-api.jar                                             
file:/home/user/tomcat/tomcat/lib/tomcat-api.jar                                          
file:/home/user/tomcat/tomcat/lib/catalina-tribes.jar                                     
file:/home/user/tomcat/tomcat/lib/annotations-api.jar                                     
file:/home/user/tomcat/tomcat/lib/catalina-ha.jar                                         
file:/home/user/tomcat/tomcat/lib/jasper.jar                                              
file:/home/user/tomcat/tomcat/lib/tomcat-i18n-es.jar                                      
file:/home/user/tomcat/tomcat/lib/catalina.jar                                            
file:/home/user/tomcat/tomcat/lib/tomcat-coyote.jar                                       
file:/home/user/tomcat/tomcat/lib/jasper-el.jar                                           
file:/home/user/tomcat/tomcat/lib/tomcat-i18n-ja.jar                                      
file:/home/user/tomcat/tomcat/lib/catalina-ant.jar                                        
file:/home/user/tomcat/tomcat/lib/tomcat-i18n-fr.jar                                      
file:/home/user/tomcat/tomcat/lib/tomcat-dbcp.jar     
</pre><p>&#x4F7F;&#x7528;ClassLoader&#x53BB;&#x67E5;&#x627E;resource</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span> classloader -c 4b7d94f8 -r META-INF/MANIFEST.MF
 jar:file:/home/user/tomcat/tomcat/bin/bootstrap.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF                
 jar:file:/home/user/tomcat/tomcat/bin/commons-daemon.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF           
 jar:file:/home/user/tomcat/tomcat/bin/tomcat-juli.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF              
 jar:file:/home/user/tomcat/www/qconfig-admin/webapps/ROOT/WEB-INF/lib/qtracer-instrument
 -agent-1.4.2.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF                                         
 jar:file:/home/user/tomcat/qflume-ng/arthas/lib/arthas-agent.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF   
 jar:file:/home/user/tomcat/tomcat/lib/ecj-4.2.2.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF                
 jar:file:/home/user/tomcat/tomcat/lib/servlet-api.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF              
 jar:file:/home/user/tomcat/tomcat/lib/websocket-api.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF            
 jar:file:/home/user/tomcat/tomcat/lib/tomcat-util.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF              
 jar:file:/home/user/tomcat/tomcat/lib/tomcat7-websocket.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF        
 jar:file:/home/user/tomcat/tomcat/lib/el-api.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF                   
 jar:file:/home/user/tomcat/tomcat/lib/tomcat-jdbc.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF              
 jar:file:/home/user/tomcat/tomcat/lib/jsp-api.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF          
 <span class="token punctuation">..</span>.
</pre><p>&#x67E5;&#x627E;&#x7C7B;&#x7684;class&#x6587;&#x4EF6;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>classloader -c 4b7d94f8  -r java/lang/String.class
 jar:file:/home/user/tomcat/java/jdk1.7.0_45/jre/lib/rt.jar<span class="token operator">!</span>/java/lang/String.class
</pre><h2 class="mume-header" id="monitor">monitor</h2>

<blockquote>
<p>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x76D1;&#x63A7;
&#x5BF9;&#x5339;&#x914D; class-pattern&#xFF0F;method-pattern&#x7684;&#x7C7B;&#x3001;&#x65B9;&#x6CD5;&#x7684;&#x8C03;&#x7528;&#x8FDB;&#x884C;&#x76D1;&#x63A7;&#x3002;</p>
</blockquote>
<blockquote>
<p>monitor &#x547D;&#x4EE4;&#x662F;&#x4E00;&#x4E2A;&#x975E;&#x5B9E;&#x65F6;&#x8FD4;&#x56DE;&#x547D;&#x4EE4;.
&#x5B9E;&#x65F6;&#x8FD4;&#x56DE;&#x547D;&#x4EE4;&#x662F;&#x8F93;&#x5165;&#x4E4B;&#x540E;&#x7ACB;&#x5373;&#x8FD4;&#x56DE;&#xFF0C;&#x800C;&#x975E;&#x5B9E;&#x65F6;&#x8FD4;&#x56DE;&#x7684;&#x547D;&#x4EE4;&#xFF0C;&#x5219;&#x662F;&#x4E0D;&#x65AD;&#x7684;&#x7B49;&#x5F85;&#x76EE;&#x6807; Java &#x8FDB;&#x7A0B;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;&#xFF0C;&#x76F4;&#x5230;&#x7528;&#x6237;&#x8F93;&#x5165; Ctrl+C &#x4E3A;&#x6B62;&#x3002;
&#x670D;&#x52A1;&#x7AEF;&#x662F;&#x4EE5;&#x4EFB;&#x52A1;&#x7684;&#x5F62;&#x5F0F;&#x5728;&#x540E;&#x53F0;&#x8DD1;&#x4EFB;&#x52A1;&#xFF0C;&#x690D;&#x5165;&#x7684;&#x4EE3;&#x7801;&#x968F;&#x7740;&#x4EFB;&#x52A1;&#x7684;&#x4E2D;&#x6B62;&#x800C;&#x4E0D;&#x4F1A;&#x88AB;&#x6267;&#x884C;&#xFF0C;&#x6240;&#x4EE5;&#x4EFB;&#x52A1;&#x5173;&#x95ED;&#x540E;&#xFF0C;&#x4E0D;&#x4F1A;&#x5BF9;&#x539F;&#x6709;&#x6027;&#x80FD;&#x4EA7;&#x751F;&#x592A;&#x5927;&#x5F71;&#x54CD;&#xFF0C;&#x800C;&#x4E14;&#x539F;&#x5219;&#x4E0A;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x4E0D;&#x4F1A;&#x5F15;&#x8D77;&#x539F;&#x6709;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x7684;&#x6539;&#x53D8;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E7%9B%91%E6%8E%A7%E7%BB%B4%E5%BA%A6%E8%AF%B4%E6%98%8E">&#x76D1;&#x63A7;&#x7EF4;&#x5EA6;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x76D1;&#x63A7;&#x9879;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>timestamp</td>
<td>&#x65F6;&#x95F4;&#x6233;</td>
</tr>
<tr>
<td>class</td>
<td>Java&#x7C7B;</td>
</tr>
<tr>
<td>method</td>
<td>&#x65B9;&#x6CD5;&#xFF08;&#x6784;&#x9020;&#x65B9;&#x6CD5;&#x3001;&#x666E;&#x901A;&#x65B9;&#x6CD5;&#xFF09;</td>
</tr>
<tr>
<td>total</td>
<td>&#x8C03;&#x7528;&#x6B21;&#x6570;</td>
</tr>
<tr>
<td>success</td>
<td>&#x6210;&#x529F;&#x6B21;&#x6570;</td>
</tr>
<tr>
<td>fail</td>
<td>&#x5931;&#x8D25;&#x6B21;&#x6570;</td>
</tr>
<tr>
<td>rt</td>
<td>&#x5E73;&#x5747;RT</td>
</tr>
<tr>
<td>fail-rate</td>
<td>&#x5931;&#x8D25;&#x7387;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-9">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>method-pattern</td>
<td>&#x65B9;&#x6CD5;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[c:]</td>
<td>&#x7EDF;&#x8BA1;&#x5468;&#x671F;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;120&#x79D2;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-22">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>monitor -c 5 qunar.tc.Test query
monitor -c 5 qunar.tc.Test query
Press Ctrl+C to abort.
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 86 ms.
timestamp            class           method      total  success  fail  rt    fail-rate
-----------------------------------------------------------------------------------------------------------------------------------
 2018-11-07 10:56:40  qunar.tc.Test  query       10     10       0     2.00  0.00%

 timestamp            class          method      total  success  fail  rt    fail-rate
-----------------------------------------------------------------------------------------------------------------------------------
 2018-11-07 10:56:45  qunar.tc.Test  query       11     11       0     2.18  0.00%

 timestamp            class          method      total  success  fail  rt    fail-rate
-----------------------------------------------------------------------------------------------------------------------------------
 2018-11-07 10:56:50  qunar.tc.Test  query        0      0        0     0.00  0.00%                                                      
</pre><h2 class="mume-header" id="watch">watch</h2>

<blockquote>
<p>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x6570;&#x636E;&#x89C2;&#x6D4B;
&#x8BA9;&#x4F60;&#x80FD;&#x65B9;&#x4FBF;&#x7684;&#x89C2;&#x5BDF;&#x5230;&#x6307;&#x5B9A;&#x65B9;&#x6CD5;&#x7684;&#x8C03;&#x7528;&#x60C5;&#x51B5;&#x3002;&#x80FD;&#x89C2;&#x5BDF;&#x5230;&#x7684;&#x8303;&#x56F4;&#x4E3A;&#xFF1A;&#x8FD4;&#x56DE;&#x503C;&#x3001;&#x629B;&#x51FA;&#x5F02;&#x5E38;&#x3001;&#x5165;&#x53C2;&#xFF0C;&#x901A;&#x8FC7;&#x7F16;&#x5199; OGNL &#x8868;&#x8FBE;&#x5F0F;&#x8FDB;&#x884C;&#x5BF9;&#x5E94;&#x53D8;&#x91CF;&#x7684;&#x67E5;&#x770B;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E5%88%97%E8%A1%A8">&#x53C2;&#x6570;&#x5217;&#x8868;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>method-pattern</td>
<td>&#x65B9;&#x6CD5;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>express</td>
<td>&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;</td>
</tr>
<tr>
<td>condition-express</td>
<td>&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;</td>
</tr>
<tr>
<td>[b]</td>
<td>&#x5728;&#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x4E4B;&#x524D;&#x89C2;&#x5BDF;</td>
</tr>
<tr>
<td>[e]</td>
<td>&#x5728;&#x65B9;&#x6CD5;&#x5F02;&#x5E38;&#x4E4B;&#x540E;&#x89C2;&#x5BDF;</td>
</tr>
<tr>
<td>[s]</td>
<td>&#x5728;&#x65B9;&#x6CD5;&#x8FD4;&#x56DE;&#x4E4B;&#x540E;&#x89C2;&#x5BDF;</td>
</tr>
<tr>
<td>[f]</td>
<td>&#x5728;&#x65B9;&#x6CD5;&#x7ED3;&#x675F;&#x4E4B;&#x540E;(&#x6B63;&#x5E38;&#x8FD4;&#x56DE;&#x548C;&#x5F02;&#x5E38;&#x8FD4;&#x56DE;)&#x89C2;&#x5BDF;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[x:]</td>
<td>&#x6307;&#x5B9A;&#x8F93;&#x51FA;&#x7ED3;&#x679C;&#x7684;&#x5C5E;&#x6027;&#x904D;&#x5386;&#x6DF1;&#x5EA6;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A; 1&#xFF0C;&#x5F53;&#x6CA1;&#x6709;&#x8F93;&#x51FA;&#x65F6;&#xFF0C;&#x53EF;&#x4EE5;&#x9002;&#x5F53;&#x589E;&#x52A0;&#x904D;&#x5386;&#x6DF1;&#x5EA6;</td>
</tr>
<tr>
<td>#cost</td>
<td>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x8017;&#x65F6;</td>
</tr>
</tbody>
</table>
<p>&#x8FD9;&#x91CC;&#x91CD;&#x70B9;&#x8981;&#x8BF4;&#x660E;&#x7684;&#x662F;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x6784;&#x6210;&#x4E3B;&#x8981;&#x7531; ognl&#x8868;&#x8FBE;&#x5F0F;&#x7EC4;&#x6210;&#xFF0C;&#x6240;&#x4EE5;&#x4F60;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x5199;<code>{params,returnObj}</code>&#xFF0C; &#x53EA;&#x8981;&#x662F;&#x4E00;&#x4E2A;&#x5408;&#x6CD5;&#x7684;ognl&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x90FD;&#x80FD;&#x88AB;&#x6B63;&#x5E38;&#x652F;&#x6301;&#x3002;</p>
<p>&#x89C2;&#x5BDF;&#x7684;&#x7EF4;&#x5EA6;&#x4E5F;&#x6BD4;&#x8F83;&#x591A;&#xFF0C;&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;&#x53C2;&#x6570; advice &#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#x4E0A;&#x3002;Advice &#x53C2;&#x6570;&#x6700;&#x4E3B;&#x8981;&#x662F;&#x5C01;&#x88C5;&#x4E86;&#x901A;&#x77E5;&#x8282;&#x70B9;&#x7684;&#x6240;&#x6709;&#x4FE1;&#x606F;&#x3002;&#x8BF7;&#x53C2;&#x8003;<a href="https://alibaba.github.io/arthas/advice-class.html">&#x8868;&#x8FBE;&#x5F0F;&#x6838;&#x5FC3;&#x53D8;&#x91CF;</a>&#x4E2D;&#x5173;&#x4E8E;&#x8BE5;&#x8282;&#x70B9;&#x7684;&#x63CF;&#x8FF0;&#x3002;</p>
<p>&#x7279;&#x6B8A;&#x7528;&#x6CD5;&#x8BF7;&#x53C2;&#x8003;&#xFF1A;<a href="https://github.com/alibaba/arthas/issues/71">https://github.com/alibaba/arthas/issues/71</a>
OGNL&#x8868;&#x8FBE;&#x5F0F;&#x5B98;&#x7F51;&#xFF1A;<a href="https://commons.apache.org/proper/commons-ognl/language-guide.html">https://commons.apache.org/proper/commons-ognl/language-guide.html</a></p>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5F88;&#x591A;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x53EA;&#x60F3;&#x770B;&#x5230;&#x67D0;&#x4E2A;&#x65B9;&#x6CD5;&#x7684;rt&#x5927;&#x4E8E;&#x67D0;&#x4E2A;&#x65F6;&#x95F4;&#x4E4B;&#x540E;&#x7684;watch&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x6309;&#x7167;&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x7684;&#x8017;&#x65F6;&#x6765;&#x8FDB;&#x884C;&#x8FC7;&#x6EE4;&#x4E86;&#xFF0C;&#x4F8B;&#x5982;watch qunar.tc.Test query {params,returnObj} -x 10 #cost&gt;100&#xFF0C;#cost&gt;100&#x8868;&#x793A;&#x5F53;&#x6267;&#x884C;&#x65F6;&#x95F4;&#x8D85;&#x8FC7;100ms&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x624D;&#x4F1A;&#x8F93;&#x51FA;watch&#x7684;&#x7ED3;&#x679C;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-23">&#x5B9E;&#x4F8B;</h3>

<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>watch qunar.tc.Test query <span class="token punctuation">{</span>params,returnObj<span class="token punctuation">}</span> -x 10
<span class="token function">watch</span> qunar.tc.Test query
s <span class="token punctuation">{</span>params,returnObj<span class="token punctuation">}</span> -x 10
Press Ctrl+C to abort.
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 83 ms.
ts<span class="token operator">=</span>2018-11-07 17:43:56<span class="token punctuation">;</span>result<span class="token operator">=</span>@ArrayList<span class="token punctuation">[</span>
    @Object<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">[</span>
        @String<span class="token punctuation">[</span>test<span class="token punctuation">]</span>,
    <span class="token punctuation">]</span>,
    @EmptyList<span class="token punctuation">[</span>isEmpty<span class="token operator">=</span>true<span class="token punctuation">;</span>size<span class="token operator">=</span>0<span class="token punctuation">]</span>,
<span class="token punctuation">]</span>
</pre><h2 class="mume-header" id="trace">trace</h2>

<blockquote>
<p>&#x65B9;&#x6CD5;&#x5185;&#x90E8;&#x8C03;&#x7528;&#x8DEF;&#x5F84;&#xFF0C;&#x5E76;&#x8F93;&#x51FA;&#x65B9;&#x6CD5;&#x8DEF;&#x5F84;&#x4E0A;&#x7684;&#x6BCF;&#x4E2A;&#x8282;&#x70B9;&#x4E0A;&#x8017;&#x65F6;
trace &#x547D;&#x4EE4;&#x80FD;&#x4E3B;&#x52A8;&#x641C;&#x7D22; class-pattern&#xFF0F;method-pattern &#x5BF9;&#x5E94;&#x7684;&#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x8DEF;&#x5F84;&#xFF0C;&#x6E32;&#x67D3;&#x548C;&#x7EDF;&#x8BA1;&#x6574;&#x4E2A;&#x8C03;&#x7528;&#x94FE;&#x8DEF;&#x4E0A;&#x7684;&#x6240;&#x6709;&#x6027;&#x80FD;&#x5F00;&#x9500;&#x548C;&#x8FFD;&#x8E2A;&#x8C03;&#x7528;&#x94FE;&#x8DEF;&#x3002;</p>
</blockquote>
<p>&#x8FD9;&#x91CC;&#x91CD;&#x70B9;&#x8981;&#x8BF4;&#x660E;&#x7684;&#x662F;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x6784;&#x6210;&#x4E3B;&#x8981;&#x7531; ognl&#x8868;&#x8FBE;&#x5F0F;&#x7EC4;&#x6210;&#xFF0C;&#x6240;&#x4EE5;&#x4F60;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x5199;<code>{params,returnObj}</code>&#xFF0C; &#x53EA;&#x8981;&#x662F;&#x4E00;&#x4E2A;&#x5408;&#x6CD5;&#x7684;ognl&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x90FD;&#x80FD;&#x88AB;&#x6B63;&#x5E38;&#x652F;&#x6301;&#x3002;</p>
<p>&#x89C2;&#x5BDF;&#x7684;&#x7EF4;&#x5EA6;&#x4E5F;&#x6BD4;&#x8F83;&#x591A;&#xFF0C;&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;&#x53C2;&#x6570; advice &#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#x4E0A;&#x3002;Advice &#x53C2;&#x6570;&#x6700;&#x4E3B;&#x8981;&#x662F;&#x5C01;&#x88C5;&#x4E86;&#x901A;&#x77E5;&#x8282;&#x70B9;&#x7684;&#x6240;&#x6709;&#x4FE1;&#x606F;&#x3002;&#x8BF7;&#x53C2;&#x8003;<a href="https://alibaba.github.io/arthas/advice-class.html">&#x8868;&#x8FBE;&#x5F0F;&#x6838;&#x5FC3;&#x53D8;&#x91CF;</a>&#x4E2D;&#x5173;&#x4E8E;&#x8BE5;&#x8282;&#x70B9;&#x7684;&#x63CF;&#x8FF0;&#x3002;</p>
<p>&#x7279;&#x6B8A;&#x7528;&#x6CD5;&#x8BF7;&#x53C2;&#x8003;&#xFF1A;<a href="https://github.com/alibaba/arthas/issues/71">https://github.com/alibaba/arthas/issues/71</a>
OGNL&#x8868;&#x8FBE;&#x5F0F;&#x5B98;&#x7F51;&#xFF1A;<a href="https://commons.apache.org/proper/commons-ognl/language-guide.html">https://commons.apache.org/proper/commons-ognl/language-guide.html</a></p>
<blockquote>
<p><font color="red">&#x6CE8;&#x610F;&#xFF1A;</font>trace &#x80FD;&#x65B9;&#x4FBF;&#x7684;&#x5E2E;&#x52A9;&#x4F60;&#x5B9A;&#x4F4D;&#x548C;&#x53D1;&#x73B0;&#x56E0; RT&#x9AD8;&#x800C;&#x5BFC;&#x81F4;&#x7684;&#x6027;&#x80FD;&#x95EE;&#x9898;&#x7F3A;&#x9677;&#xFF0C;&#x4F46;&#x5176;&#x6BCF;&#x6B21;&#x53EA;&#x80FD;&#x8DDF;&#x8E2A;&#x4E00;&#x7EA7;&#x65B9;&#x6CD5;&#x7684;&#x8C03;&#x7528;&#x94FE;&#x8DEF;&#x3002;</p>
</blockquote>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5F88;&#x591A;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x53EA;&#x60F3;&#x770B;&#x5230;&#x67D0;&#x4E2A;&#x65B9;&#x6CD5;&#x7684;rt&#x5927;&#x4E8E;&#x67D0;&#x4E2A;&#x65F6;&#x95F4;&#x4E4B;&#x540E;&#x7684;trace&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x6309;&#x7167;&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x7684;&#x8017;&#x65F6;&#x6765;&#x8FDB;&#x884C;&#x8FC7;&#x6EE4;&#x4E86;&#xFF0C;&#x4F8B;&#x5982;trace *StringUtils isBlank #cost&gt;100&#x8868;&#x793A;&#x5F53;&#x6267;&#x884C;&#x65F6;&#x95F4;&#x8D85;&#x8FC7;100ms&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x624D;&#x4F1A;&#x8F93;&#x51FA;trace&#x7684;&#x7ED3;&#x679C;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-10">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;&#x3001;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>method-pattern</td>
<td>&#x65B9;&#x6CD5;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>condition-express</td>
<td>&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[n:]</td>
<td>&#x547D;&#x4EE4;&#x6267;&#x884C;&#x6B21;&#x6570;</td>
</tr>
<tr>
<td>#cost</td>
<td>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x8017;&#x65F6;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-24">&#x5B9E;&#x4F8B;</h3>

<p>&#x76D1;&#x6D4B;&#x65B9;&#x6CD5;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>trace qunar.tc.Test query  params.length<span class="token operator">==</span>1
trace qunar.tc.Test query
s  params.length<span class="token operator">==</span>1
Press Ctrl+C to abort.

Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 140 ms.
<span class="token variable"><span class="token variable">`</span>---ts<span class="token operator">=</span>2018-11-07 19:39:13<span class="token punctuation">;</span>thread_name<span class="token operator">=</span>http-bio-8080-exec-6<span class="token punctuation">;</span>id<span class="token operator">=</span>c9<span class="token punctuation">;</span>is_daemon<span class="token operator">=</span>true<span class="token punctuation">;</span>priority<span class="token operator">=</span>5<span class="token punctuation">;</span>TCCL<span class="token operator">=</span>org.apache.catalina.loader.WebappClassLoader@2fe83622
    <span class="token variable">`</span></span>---<span class="token punctuation">[</span>15.44114ms<span class="token punctuation">]</span> qunar.tc.Test:query<span class="token punctuation">(</span><span class="token punctuation">)</span>
        `---<span class="token punctuation">[</span>0.026753ms<span class="token punctuation">]</span> qunar.tc.Test:query<span class="token punctuation">(</span><span class="token punctuation">)</span>
</pre><p>&#x6309;&#x7167;&#x8017;&#x65F6;&#x8FC7;&#x6EE4;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>trace qunar.tc.Test query <span class="token comment">#cost&gt;100</span>
trace qunar.tc.Test query
s <span class="token comment">#cost&lt;100</span>
Press Ctrl+C to abort.
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 118 ms.
<span class="token variable"><span class="token variable">`</span>---ts<span class="token operator">=</span>2018-11-07 19:32:42<span class="token punctuation">;</span>thread_name<span class="token operator">=</span>http-bio-8080-exec-6<span class="token punctuation">;</span>id<span class="token operator">=</span>c9<span class="token punctuation">;</span>is_daemon<span class="token operator">=</span>true<span class="token punctuation">;</span>priority<span class="token operator">=</span>5<span class="token punctuation">;</span>TCCL<span class="token operator">=</span>org.apache.catalina.loader.WebappClassLoader@2fe83622
    <span class="token variable">`</span></span>---<span class="token punctuation">[</span>17.131568ms<span class="token punctuation">]</span> qunar.tc.Test:query<span class="token punctuation">(</span><span class="token punctuation">)</span>
        `---<span class="token punctuation">[</span>0.026861ms<span class="token punctuation">]</span> qunar.tc.Test:query<span class="token punctuation">(</span><span class="token punctuation">)</span>
</pre><p>&#x53EA;&#x4F1A;&#x5C55;&#x793A;&#x8017;&#x65F6;&#x5927;&#x4E8E;100ms&#x7684;&#x8C03;&#x7528;&#x8DEF;&#x5F84;&#xFF0C;&#x6709;&#x52A9;&#x4E8E;&#x5728;&#x6392;&#x67E5;&#x95EE;&#x9898;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x53EA;&#x5173;&#x6CE8;&#x5F02;&#x5E38;&#x60C5;&#x51B5;</p>
<h2 class="mume-header" id="stack">stack</h2>

<blockquote>
<p>&#x8F93;&#x51FA;&#x5F53;&#x524D;&#x65B9;&#x6CD5;&#x88AB;&#x8C03;&#x7528;&#x7684;&#x8C03;&#x7528;&#x8DEF;&#x5F84;
&#x5F88;&#x591A;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x90FD;&#x77E5;&#x9053;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#x88AB;&#x6267;&#x884C;&#xFF0C;&#x4F46;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x88AB;&#x6267;&#x884C;&#x7684;&#x8DEF;&#x5F84;&#x975E;&#x5E38;&#x591A;&#xFF0C;&#x6216;&#x8005;&#x4F60;&#x6839;&#x672C;&#x5C31;&#x4E0D;&#x77E5;&#x9053;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x662F;&#x4ECE;&#x90A3;&#x91CC;&#x88AB;&#x6267;&#x884C;&#x4E86;&#xFF0C;&#x6B64;&#x65F6;&#x4F60;&#x9700;&#x8981;&#x7684;&#x662F; stack &#x547D;&#x4EE4;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E-11">&#x53C2;&#x6570;&#x8BF4;&#x660E;</h3>

<table>
<thead>
<tr>
<th>&#x53C2;&#x6570;&#x540D;&#x79F0;</th>
<th>&#x53C2;&#x6570;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>class-pattern</td>
<td>&#x7C7B;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>method-pattern</td>
<td>&#x65B9;&#x6CD5;&#x540D;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>condition-express</td>
<td>&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;</td>
</tr>
<tr>
<td>[E]</td>
<td>&#x5F00;&#x542F;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x901A;&#x914D;&#x7B26;&#x5339;&#x914D;</td>
</tr>
<tr>
<td>[n:]</td>
<td>&#x6267;&#x884C;&#x6B21;&#x6570;&#x9650;&#x5236;</td>
</tr>
<tr>
<td>#cost</td>
<td>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x8017;&#x65F6;</td>
</tr>
</tbody>
</table>
<p>&#x8FD9;&#x91CC;&#x91CD;&#x70B9;&#x8981;&#x8BF4;&#x660E;&#x7684;&#x662F;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x6784;&#x6210;&#x4E3B;&#x8981;&#x7531; ognl&#x8868;&#x8FBE;&#x5F0F;&#x7EC4;&#x6210;&#xFF0C;&#x6240;&#x4EE5;&#x4F60;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x5199;<code>{params,returnObj}</code>&#xFF0C; &#x53EA;&#x8981;&#x662F;&#x4E00;&#x4E2A;&#x5408;&#x6CD5;&#x7684;ognl&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x90FD;&#x80FD;&#x88AB;&#x6B63;&#x5E38;&#x652F;&#x6301;&#x3002;</p>
<p>&#x89C2;&#x5BDF;&#x7684;&#x7EF4;&#x5EA6;&#x4E5F;&#x6BD4;&#x8F83;&#x591A;&#xFF0C;&#x4E3B;&#x8981;&#x4F53;&#x73B0;&#x5728;&#x53C2;&#x6570; advice &#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#x4E0A;&#x3002;Advice &#x53C2;&#x6570;&#x6700;&#x4E3B;&#x8981;&#x662F;&#x5C01;&#x88C5;&#x4E86;&#x901A;&#x77E5;&#x8282;&#x70B9;&#x7684;&#x6240;&#x6709;&#x4FE1;&#x606F;&#x3002;&#x8BF7;&#x53C2;&#x8003;<a href="https://alibaba.github.io/arthas/advice-class.html">&#x8868;&#x8FBE;&#x5F0F;&#x6838;&#x5FC3;&#x53D8;&#x91CF;</a>&#x4E2D;&#x5173;&#x4E8E;&#x8BE5;&#x8282;&#x70B9;&#x7684;&#x63CF;&#x8FF0;&#x3002;</p>
<p>&#x7279;&#x6B8A;&#x7528;&#x6CD5;&#x8BF7;&#x53C2;&#x8003;&#xFF1A;<a href="https://github.com/alibaba/arthas/issues/71">https://github.com/alibaba/arthas/issues/71</a>
OGNL&#x8868;&#x8FBE;&#x5F0F;&#x5B98;&#x7F51;&#xFF1A;<a href="https://commons.apache.org/proper/commons-ognl/language-guide.html">https://commons.apache.org/proper/commons-ognl/language-guide.html</a></p>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5F88;&#x591A;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x53EA;&#x60F3;&#x770B;&#x5230;&#x67D0;&#x4E2A;&#x65B9;&#x6CD5;&#x7684;rt&#x5927;&#x4E8E;&#x67D0;&#x4E2A;&#x65F6;&#x95F4;&#x4E4B;&#x540E;&#x7684;stack&#x7ED3;&#x679C;&#xFF0C;&#x53EF;&#x4EE5;&#x6309;&#x7167;&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x7684;&#x8017;&#x65F6;&#x6765;&#x8FDB;&#x884C;&#x8FC7;&#x6EE4;&#x4E86;&#xFF0C;&#x4F8B;&#x5982;stack qunar.tc.Test query #cost&gt;100&#x8868;&#x793A;&#x5F53;&#x6267;&#x884C;&#x65F6;&#x95F4;&#x8D85;&#x8FC7;100ms&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x624D;&#x4F1A;&#x8F93;&#x51FA;stack&#x7684;&#x7ED3;&#x679C;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-25">&#x5B9E;&#x4F8B;</h3>

<p>&#x6CE8;&#x610F;&#xFF1A;&#x5982;&#x679C;&#x8868;&#x8FBE;&#x5F0F;&#x91CC;&#x9762;&#x5305;&#x542B;&#x4E86;&#x5F15;&#x53F7;&#xFF0C;&#x90A3;&#x4E48;&#x9700;&#x8981;&#x628A;&#x6574;&#x4E2A;&#x8868;&#x8FBE;&#x5F0F;&#x7528;&#x5F15;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#xFF0C;&#x5982;&#x679C;&#x8868;&#x8FBE;&#x5F0F;&#x4E2D;&#x6CA1;&#x6709;&#x5305;&#x542B;&#x5F15;&#x53F7;&#xFF0C;&#x90A3;&#x4E48;&#x53EF;&#x4EE5;&#x4E0D;&#x7528;&#x5F15;&#x53F7;&#x3002;&#x5F53;&#x7136;&#xFF0C;&#x4E00;&#x4E2A;&#x597D;&#x7684;&#x4E60;&#x60EF;&#x662F;&#xFF0C;&#x4E0D;&#x7BA1;&#x8868;&#x8FBE;&#x5F0F;&#x4E2D;&#x6709;&#x6CA1;&#x6709;&#x5F15;&#x53F7;&#xFF0C;&#x90FD;&#x4F7F;&#x7528;&#x5F15;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#x3002;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>stack qunar.tc.Test query  params.length<span class="token operator">==</span>1
stack qunar.tc.Test query
s  params.length<span class="token operator">==</span>1
Press Ctrl+C to abort.
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 147 ms.
ts<span class="token operator">=</span>2018-11-07 19:51:48<span class="token punctuation">;</span>thread_name<span class="token operator">=</span>http-bio-8080-exec-7<span class="token punctuation">;</span>id<span class="token operator">=</span>ca<span class="token punctuation">;</span>is_daemon<span class="token operator">=</span>true<span class="token punctuation">;</span>priority<span class="token operator">=</span>5<span class="token punctuation">;</span>TCCL<span class="token operator">=</span>org.apache.catalina.loader.WebappClassLoader@2fe83622
    @qunar.tc.Test.query<span class="token punctuation">(</span><span class="token punctuation">)</span>
        at sun.reflect.NativeMethodAccessorImpl.invoke0<span class="token punctuation">(</span>NativeMethodAccessorImpl.java:-2<span class="token punctuation">)</span>
        at sun.reflect.NativeMethodAccessorImpl.invoke<span class="token punctuation">(</span>NativeMethodAccessorImpl.java:62<span class="token punctuation">)</span>
        at sun.reflect.DelegatingMethodAccessorImpl.invoke<span class="token punctuation">(</span>DelegatingMethodAccessorImpl.java:43<span class="token punctuation">)</span>
        at java.lang.reflect.Method.invoke<span class="token punctuation">(</span>Method.java:498<span class="token punctuation">)</span>
        at org.springframework.web.method.support.InvocableHandlerMethod.invoke<span class="token punctuation">(</span>InvocableHandlerMethod.java:215<span class="token punctuation">)</span>
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest<span class="token punctuation">(</span>InvocableHandlerMethod.java:132<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle<span class="token punctuation">(</span>ServletInvocableHandlerMethod.java:104<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod<span class="token punctuation">(</span>RequestMappingHandlerAdapter.java:745<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal<span class="token punctuation">(</span>RequestMappingHandlerAdapter.java:686<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle<span class="token punctuation">(</span>AbstractHandlerMethodAdapter.java:80<span class="token punctuation">)</span>
        at org.springframework.web.servlet.DispatcherServlet.doDispatch<span class="token punctuation">(</span>DispatcherServlet.java:925<span class="token punctuation">)</span>
        at org.springframework.web.servlet.DispatcherServlet.doService<span class="token punctuation">(</span>DispatcherServlet.java:856<span class="token punctuation">)</span>
        at org.springframework.web.servlet.FrameworkServlet.processRequest<span class="token punctuation">(</span>FrameworkServlet.java:953<span class="token punctuation">)</span>
        at org.springframework.web.servlet.FrameworkServlet.doGet<span class="token punctuation">(</span>FrameworkServlet.java:844<span class="token punctuation">)</span>
        at javax.servlet.http.HttpServlet.service<span class="token punctuation">(</span>HttpServlet.java:621<span class="token punctuation">)</span>
        at org.springframework.web.servlet.FrameworkServlet.service<span class="token punctuation">(</span>FrameworkServlet.java:829<span class="token punctuation">)</span>
        at javax.servlet.http.HttpServlet.service<span class="token punctuation">(</span>HttpServlet.java:728<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:305<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.tomcat.websocket.server.WsFilter.doFilter<span class="token punctuation">(</span>WsFilter.java:51<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal<span class="token punctuation">(</span>CharacterEncodingFilter.java:88<span class="token punctuation">)</span>
        at org.springframework.web.filter.OncePerRequestFilter.doFilter<span class="token punctuation">(</span>OncePerRequestFilter.java:107<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardWrapperValve.invoke<span class="token punctuation">(</span>StandardWrapperValve.java:222<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardContextValve.invoke<span class="token punctuation">(</span>StandardContextValve.java:123<span class="token punctuation">)</span>
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke<span class="token punctuation">(</span>AuthenticatorBase.java:502<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardHostValve.invoke<span class="token punctuation">(</span>StandardHostValve.java:171<span class="token punctuation">)</span>
        at org.apache.catalina.valves.ErrorReportValve.invoke<span class="token punctuation">(</span>ErrorReportValve.java:100<span class="token punctuation">)</span>
        at org.apache.catalina.valves.AccessLogValve.invoke<span class="token punctuation">(</span>AccessLogValve.java:953<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardEngineValve.invoke<span class="token punctuation">(</span>StandardEngineValve.java:118<span class="token punctuation">)</span>
        at org.apache.catalina.connector.CoyoteAdapter.service<span class="token punctuation">(</span>CoyoteAdapter.java:408<span class="token punctuation">)</span>
        at org.apache.coyote.http11.AbstractHttp11Processor.process<span class="token punctuation">(</span>AbstractHttp11Processor.java:1041<span class="token punctuation">)</span>
        at org.apache.coyote.AbstractProtocol<span class="token variable">$AbstractConnectionHandler</span>.process<span class="token punctuation">(</span>AbstractProtocol.java:603<span class="token punctuation">)</span>
        at org.apache.tomcat.util.net.JIoEndpoint<span class="token variable">$SocketProcessor</span>.run<span class="token punctuation">(</span>JIoEndpoint.java:310<span class="token punctuation">)</span>
        at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1142<span class="token punctuation">)</span>
        at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:617<span class="token punctuation">)</span>
        at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:745<span class="token punctuation">)</span>
</pre><p>&#x6309;&#x7167;&#x8017;&#x65F6;&#x67E5;&#x8BE2;:</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>stack qunar.Test query  <span class="token comment">#cost&gt;10</span>
stack qunar.tc.Test query
s  <span class="token comment">#cost&gt;10</span>
Press Ctrl+C to abort.
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 130 ms.
ts<span class="token operator">=</span>2018-11-07 19:57:15<span class="token punctuation">;</span>thread_name<span class="token operator">=</span>http-bio-8080-exec-8<span class="token punctuation">;</span>id<span class="token operator">=</span>cb<span class="token punctuation">;</span>is_daemon<span class="token operator">=</span>true<span class="token punctuation">;</span>priority<span class="token operator">=</span>5<span class="token punctuation">;</span>TCCL<span class="token operator">=</span>org.apache.catalina.loader.WebappClassLoader@2fe83622
    @qunar.tc.Test.query<span class="token punctuation">(</span><span class="token punctuation">)</span>
        at sun.reflect.NativeMethodAccessorImpl.invoke0<span class="token punctuation">(</span>NativeMethodAccessorImpl.java:-2<span class="token punctuation">)</span>
        at sun.reflect.NativeMethodAccessorImpl.invoke<span class="token punctuation">(</span>NativeMethodAccessorImpl.java:62<span class="token punctuation">)</span>
        at sun.reflect.DelegatingMethodAccessorImpl.invoke<span class="token punctuation">(</span>DelegatingMethodAccessorImpl.java:43<span class="token punctuation">)</span>
        at java.lang.reflect.Method.invoke<span class="token punctuation">(</span>Method.java:498<span class="token punctuation">)</span>
        at org.springframework.web.method.support.InvocableHandlerMethod.invoke<span class="token punctuation">(</span>InvocableHandlerMethod.java:215<span class="token punctuation">)</span>
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest<span class="token punctuation">(</span>InvocableHandlerMethod.java:132<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle<span class="token punctuation">(</span>ServletInvocableHandlerMethod.java:104<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod<span class="token punctuation">(</span>RequestMappingHandlerAdapter.java:745<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal<span class="token punctuation">(</span>RequestMappingHandlerAdapter.java:686<span class="token punctuation">)</span>
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle<span class="token punctuation">(</span>AbstractHandlerMethodAdapter.java:80<span class="token punctuation">)</span>
        at org.springframework.web.servlet.DispatcherServlet.doDispatch<span class="token punctuation">(</span>DispatcherServlet.java:925<span class="token punctuation">)</span>
        at org.springframework.web.servlet.DispatcherServlet.doService<span class="token punctuation">(</span>DispatcherServlet.java:856<span class="token punctuation">)</span>
        at org.springframework.web.servlet.FrameworkServlet.processRequest<span class="token punctuation">(</span>FrameworkServlet.java:953<span class="token punctuation">)</span>
        at org.springframework.web.servlet.FrameworkServlet.doGet<span class="token punctuation">(</span>FrameworkServlet.java:844<span class="token punctuation">)</span>
        at javax.servlet.http.HttpServlet.service<span class="token punctuation">(</span>HttpServlet.java:621<span class="token punctuation">)</span>
        at org.springframework.web.servlet.FrameworkServlet.service<span class="token punctuation">(</span>FrameworkServlet.java:829<span class="token punctuation">)</span>
        at javax.servlet.http.HttpServlet.service<span class="token punctuation">(</span>HttpServlet.java:728<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:305<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.tomcat.websocket.server.WsFilter.doFilter<span class="token punctuation">(</span>WsFilter.java:51<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal<span class="token punctuation">(</span>CharacterEncodingFilter.java:88<span class="token punctuation">)</span>
        at org.springframework.web.filter.OncePerRequestFilter.doFilter<span class="token punctuation">(</span>OncePerRequestFilter.java:107<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:243<span class="token punctuation">)</span>
        at org.apache.catalina.core.ApplicationFilterChain.doFilter<span class="token punctuation">(</span>ApplicationFilterChain.java:210<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardWrapperValve.invoke<span class="token punctuation">(</span>StandardWrapperValve.java:222<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardContextValve.invoke<span class="token punctuation">(</span>StandardContextValve.java:123<span class="token punctuation">)</span>
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke<span class="token punctuation">(</span>AuthenticatorBase.java:502<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardHostValve.invoke<span class="token punctuation">(</span>StandardHostValve.java:171<span class="token punctuation">)</span>
        at org.apache.catalina.valves.ErrorReportValve.invoke<span class="token punctuation">(</span>ErrorReportValve.java:100<span class="token punctuation">)</span>
        at org.apache.catalina.valves.AccessLogValve.invoke<span class="token punctuation">(</span>AccessLogValve.java:953<span class="token punctuation">)</span>
        at org.apache.catalina.core.StandardEngineValve.invoke<span class="token punctuation">(</span>StandardEngineValve.java:118<span class="token punctuation">)</span>
        at org.apache.catalina.connector.CoyoteAdapter.service<span class="token punctuation">(</span>CoyoteAdapter.java:408<span class="token punctuation">)</span>
        at org.apache.coyote.http11.AbstractHttp11Processor.process<span class="token punctuation">(</span>AbstractHttp11Processor.java:1041<span class="token punctuation">)</span>
        at org.apache.coyote.AbstractProtocol<span class="token variable">$AbstractConnectionHandler</span>.process<span class="token punctuation">(</span>AbstractProtocol.java:603<span class="token punctuation">)</span>
        at org.apache.tomcat.util.net.JIoEndpoint<span class="token variable">$SocketProcessor</span>.run<span class="token punctuation">(</span>JIoEndpoint.java:310<span class="token punctuation">)</span>
        at java.util.concurrent.ThreadPoolExecutor.runWorker<span class="token punctuation">(</span>ThreadPoolExecutor.java:1142<span class="token punctuation">)</span>
        at java.util.concurrent.ThreadPoolExecutor<span class="token variable">$Worker</span>.run<span class="token punctuation">(</span>ThreadPoolExecutor.java:617<span class="token punctuation">)</span>
        at java.lang.Thread.run<span class="token punctuation">(</span>Thread.java:745<span class="token punctuation">)</span>
</pre><h2 class="mume-header" id="tt">tt</h2>

<p>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x6570;&#x636E;&#x7684;&#x65F6;&#x7A7A;&#x96A7;&#x9053;&#xFF0C;&#x8BB0;&#x5F55;&#x4E0B;&#x6307;&#x5B9A;&#x65B9;&#x6CD5;&#x6BCF;&#x6B21;&#x8C03;&#x7528;&#x7684;&#x5165;&#x53C2;&#x548C;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;&#xFF0C;&#x5E76;&#x80FD;&#x5BF9;&#x8FD9;&#x4E9B;&#x4E0D;&#x540C;&#x7684;&#x65F6;&#x95F4;&#x4E0B;&#x8C03;&#x7528;&#x8FDB;&#x884C;&#x89C2;&#x6D4B;</p>
<blockquote>
<p>watch &#x867D;&#x7136;&#x5F88;&#x65B9;&#x4FBF;&#x548C;&#x7075;&#x6D3B;&#xFF0C;&#x4F46;&#x9700;&#x8981;&#x63D0;&#x524D;&#x60F3;&#x6E05;&#x695A;&#x89C2;&#x5BDF;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x62FC;&#x5199;&#xFF0C;&#x8FD9;&#x5BF9;&#x6392;&#x67E5;&#x95EE;&#x9898;&#x800C;&#x8A00;&#x8981;&#x6C42;&#x592A;&#x9AD8;&#xFF0C;&#x56E0;&#x4E3A;&#x5F88;&#x591A;&#x65F6;&#x5019;&#x6211;&#x4EEC;&#x5E76;&#x4E0D;&#x6E05;&#x695A;&#x95EE;&#x9898;&#x51FA;&#x81EA;&#x4E8E;&#x4F55;&#x65B9;&#xFF0C;&#x53EA;&#x80FD;&#x9760;&#x86DB;&#x4E1D;&#x9A6C;&#x8FF9;&#x8FDB;&#x884C;&#x731C;&#x6D4B;&#x3002;
&#x8FD9;&#x4E2A;&#x65F6;&#x5019;&#x5982;&#x679C;&#x80FD;&#x8BB0;&#x5F55;&#x4E0B;&#x5F53;&#x65F6;&#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x7684;&#x6240;&#x6709;&#x5165;&#x53C2;&#x548C;&#x8FD4;&#x56DE;&#x503C;&#x3001;&#x629B;&#x51FA;&#x7684;&#x5F02;&#x5E38;&#x4F1A;&#x5BF9;&#x6574;&#x4E2A;&#x95EE;&#x9898;&#x7684;&#x601D;&#x8003;&#x4E0E;&#x5224;&#x65AD;&#x975E;&#x5E38;&#x6709;&#x5E2E;&#x52A9;&#x3002;
&#x4E8E;&#x662F;&#x4E4E;&#xFF0C;TimeTunnel &#x547D;&#x4EE4;&#x5C31;&#x8BDE;&#x751F;&#x4E86;&#x3002;</p>
</blockquote>
<h3 class="mume-header" id="%E8%AE%B0%E5%BD%95%E6%96%B9%E6%B3%95%E7%9A%84%E8%B0%83%E7%94%A8">&#x8BB0;&#x5F55;&#x65B9;&#x6CD5;&#x7684;&#x8C03;&#x7528;</h3>

<ul>
<li>&#x57FA;&#x672C;&#x7528;&#x6CD5;
&#x5BF9;&#x4E8E;&#x4E00;&#x4E2A;&#x6700;&#x57FA;&#x672C;&#x7684;&#x4F7F;&#x7528;&#x6765;&#x8BF4;&#xFF0C;&#x5C31;&#x662F;&#x8BB0;&#x5F55;&#x4E0B;&#x5F53;&#x524D;&#x65B9;&#x6CD5;&#x7684;&#x6BCF;&#x6B21;&#x8C03;&#x7528;&#x73AF;&#x5883;&#x73B0;&#x573A;&#x3002;</li>
</ul>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>tt -t -n 3 *.Test query
tt -t -n 3 *.Test query
Press Ctrl+C to abort.
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 131 ms.
 INDEX               TIMESTAMP COST<span class="token punctuation">(</span>ms<span class="token punctuation">)</span>  IS-RET IS-EXP OBJECT     CLASS  METHOD    
---------------------------------------------------------------------------------
 1002  2018-11-07 20:02:58     11.438431 <span class="token boolean">true</span>   <span class="token boolean">false</span>  0x7aadaf6b Test   query   
 1003  2018-11-07 20:03:02     9.692588  <span class="token boolean">true</span>   <span class="token boolean">false</span>  0x7aadaf6b Test   query   
</pre><ul>
<li>
<p>&#x547D;&#x4EE4;&#x53C2;&#x6570;&#x89E3;&#x6790;
-t
tt &#x547D;&#x4EE4;&#x6709;&#x5F88;&#x591A;&#x4E2A;&#x4E3B;&#x53C2;&#x6570;&#xFF0C;-t &#x5C31;&#x662F;&#x5176;&#x4E2D;&#x4E4B;&#x4E00;&#x3002;&#x8FD9;&#x4E2A;&#x53C2;&#x6570;&#x7684;&#x8868;&#x660E;&#x5E0C;&#x671B;&#x8BB0;&#x5F55;&#x4E0B;&#x7C7B; *.MessageTopologyServiceImpl &#x7684; queryConsumers &#x65B9;&#x6CD5;&#x7684;&#x6BCF;&#x6B21;&#x6267;&#x884C;&#x60C5;&#x51B5;&#x3002;
-n 3
&#x5F53;&#x4F60;&#x6267;&#x884C;&#x4E00;&#x4E2A;&#x8C03;&#x7528;&#x91CF;&#x4E0D;&#x9AD8;&#x7684;&#x65B9;&#x6CD5;&#x65F6;&#x53EF;&#x80FD;&#x4F60;&#x8FD8;&#x80FD;&#x6709;&#x8DB3;&#x591F;&#x7684;&#x65F6;&#x95F4;&#x7528; CTRL+C &#x4E2D;&#x65AD; tt &#x547D;&#x4EE4;&#x8BB0;&#x5F55;&#x7684;&#x8FC7;&#x7A0B;&#xFF0C;&#x4F46;&#x5982;&#x679C;&#x9047;&#x5230;&#x8C03;&#x7528;&#x91CF;&#x975E;&#x5E38;&#x5927;&#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x77AC;&#x95F4;&#x5C31;&#x80FD;&#x5C06;&#x4F60;&#x7684; JVM &#x5185;&#x5B58;&#x6491;&#x7206;&#x3002;
&#x6B64;&#x65F6;&#x4F60;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; -n &#x53C2;&#x6570;&#x6307;&#x5B9A;&#x4F60;&#x9700;&#x8981;&#x8BB0;&#x5F55;&#x7684;&#x6B21;&#x6570;&#xFF0C;&#x5F53;&#x8FBE;&#x5230;&#x8BB0;&#x5F55;&#x6B21;&#x6570;&#x65F6; Bistoury &#x4F1A;&#x4E3B;&#x52A8;&#x4E2D;&#x65AD;tt&#x547D;&#x4EE4;&#x7684;&#x8BB0;&#x5F55;&#x8FC7;&#x7A0B;&#xFF0C;&#x907F;&#x514D;&#x4EBA;&#x5DE5;&#x64CD;&#x4F5C;&#x65E0;&#x6CD5;&#x505C;&#x6B62;&#x7684;&#x60C5;&#x51B5;&#x3002;</p>
</li>
<li>
<p>&#x8868;&#x683C;&#x5B57;&#x6BB5;&#x8BF4;&#x660E;</p>
</li>
</ul>
<table>
<thead>
<tr>
<th>&#x8868;&#x683C;&#x5B57;&#x6BB5;</th>
<th>&#x5B57;&#x6BB5;&#x89E3;&#x91CA;</th>
</tr>
</thead>
<tbody>
<tr>
<td>INDEX</td>
<td>&#x65F6;&#x95F4;&#x7247;&#x6BB5;&#x8BB0;&#x5F55;&#x7F16;&#x53F7;&#xFF0C;&#x6BCF;&#x4E00;&#x4E2A;&#x7F16;&#x53F7;&#x4EE3;&#x8868;&#x7740;&#x4E00;&#x6B21;&#x8C03;&#x7528;&#xFF0C;&#x540E;&#x7EED;tt&#x8FD8;&#x6709;&#x5F88;&#x591A;&#x547D;&#x4EE4;&#x90FD;&#x662F;&#x57FA;&#x4E8E;&#x6B64;&#x7F16;&#x53F7;&#x6307;&#x5B9A;&#x8BB0;&#x5F55;&#x64CD;&#x4F5C;&#xFF0C;&#x975E;&#x5E38;&#x91CD;&#x8981;&#x3002;</td>
</tr>
<tr>
<td>TIMESTAMP</td>
<td>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x7684;&#x672C;&#x673A;&#x65F6;&#x95F4;&#xFF0C;&#x8BB0;&#x5F55;&#x4E86;&#x8FD9;&#x4E2A;&#x65F6;&#x95F4;&#x7247;&#x6BB5;&#x6240;&#x53D1;&#x751F;&#x7684;&#x672C;&#x673A;&#x65F6;&#x95F4;</td>
</tr>
<tr>
<td>COST(ms)</td>
<td>&#x65B9;&#x6CD5;&#x6267;&#x884C;&#x7684;&#x8017;&#x65F6;</td>
</tr>
<tr>
<td>IS-RET</td>
<td>&#x65B9;&#x6CD5;&#x662F;&#x5426;&#x4EE5;&#x6B63;&#x5E38;&#x8FD4;&#x56DE;&#x7684;&#x5F62;&#x5F0F;&#x7ED3;&#x675F;</td>
</tr>
<tr>
<td>IS-EXP</td>
<td>&#x65B9;&#x6CD5;&#x662F;&#x5426;&#x4EE5;&#x629B;&#x5F02;&#x5E38;&#x7684;&#x5F62;&#x5F0F;&#x7ED3;&#x675F;</td>
</tr>
<tr>
<td>OBJECT</td>
<td>&#x6267;&#x884C;&#x5BF9;&#x8C61;&#x7684;hashCode()&#xFF0C;&#x6CE8;&#x610F;&#xFF0C;&#x66FE;&#x7ECF;&#x6709;&#x4EBA;&#x8BEF;&#x8BA4;&#x4E3A;&#x662F;&#x5BF9;&#x8C61;&#x5728;JVM&#x4E2D;&#x7684;&#x5185;&#x5B58;&#x5730;&#x5740;&#xFF0C;&#x4F46;&#x5F88;&#x9057;&#x61BE;&#x4ED6;&#x4E0D;&#x662F;&#x3002;&#x4F46;&#x4ED6;&#x80FD;&#x5E2E;&#x52A9;&#x4F60;&#x7B80;&#x5355;&#x7684;&#x6807;&#x8BB0;&#x5F53;&#x524D;&#x6267;&#x884C;&#x65B9;&#x6CD5;&#x7684;&#x7C7B;&#x5B9E;&#x4F53;</td>
</tr>
<tr>
<td>CLASS</td>
<td>&#x6267;&#x884C;&#x7684;&#x7C7B;&#x540D;</td>
</tr>
<tr>
<td>METHOD</td>
<td>&#x6267;&#x884C;&#x7684;&#x65B9;&#x6CD5;&#x540D;</td>
</tr>
</tbody>
</table>
<ul>
<li>
<p>&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;
&#x4E0D;&#x77E5;&#x9053;&#x5927;&#x5BB6;&#x662F;&#x5426;&#x6709;&#x5728;&#x4F7F;&#x7528;&#x8FC7;&#x7A0B;&#x4E2D;&#x9047;&#x5230;&#x4EE5;&#x4E0B;&#x56F0;&#x60D1;
Bistoury &#x4F3C;&#x4E4E;&#x5F88;&#x96BE;&#x533A;&#x5206;&#x51FA;&#x91CD;&#x8F7D;&#x7684;&#x65B9;&#x6CD5;
&#x6211;&#x53EA;&#x9700;&#x8981;&#x89C2;&#x5BDF;&#x7279;&#x5B9A;&#x53C2;&#x6570;&#xFF0C;&#x4F46;&#x662F; tt &#x5374;&#x5168;&#x90E8;&#x90FD;&#x7ED9;&#x6211;&#x8BB0;&#x5F55;&#x4E86;&#x4E0B;&#x6765;
&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;&#x4E5F;&#x662F;&#x7528;OGNL &#x6765;&#x7F16;&#x5199;&#xFF0C;&#x6838;&#x5FC3;&#x7684;&#x5224;&#x65AD;&#x5BF9;&#x8C61;&#x4F9D;&#x7136;&#x662F; Advice &#x5BF9;&#x8C61;&#x3002;&#x9664;&#x4E86; tt &#x547D;&#x4EE4;&#x4E4B;&#x5916;&#xFF0C;watch&#x3001;trace&#x3001;stack &#x547D;&#x4EE4;&#x4E5F;&#x90FD;&#x652F;&#x6301;&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;&#x3002;</p>
</li>
<li>
<p>&#x89E3;&#x51B3;&#x65B9;&#x6CD5;&#x91CD;&#x8F7D;
tt -t *Test print params[0].length==1
&#x901A;&#x8FC7;&#x5236;&#x5B9A;&#x53C2;&#x6570;&#x4E2A;&#x6570;&#x7684;&#x5F62;&#x5F0F;&#x89E3;&#x51B3;&#x4E0D;&#x540C;&#x7684;&#x65B9;&#x6CD5;&#x7B7E;&#x540D;&#xFF0C;&#x5982;&#x679C;&#x53C2;&#x6570;&#x4E2A;&#x6570;&#x4E00;&#x6837;&#xFF0C;&#x4F60;&#x8FD8;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x5199;
tt -t *Test print &apos;params[1] instanceof Integer&apos;</p>
</li>
<li>
<p>&#x89E3;&#x51B3;&#x6307;&#x5B9A;&#x53C2;&#x6570;
tt -t *Test print params[0].mobile==&quot;13989838402&quot;
&#x6784;&#x6210;&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;&#x7684; Advice &#x5BF9;&#x8C61;
&#x524D;&#x8FB9;&#x770B;&#x5230;&#x4E86;&#x5F88;&#x591A;&#x6761;&#x4EF6;&#x8868;&#x8FBE;&#x5F0F;&#x4E2D;&#xFF0C;&#x90FD;&#x9002;&#x7528;&#x4E86; params[0]&#xFF0C;&#x6709;&#x5173;&#x8FD9;&#x4E2A;&#x53D8;&#x91CF;&#x7684;&#x4ECB;&#x7ECD;&#xFF0C;&#x8BF7;&#x53C2;&#x8003;&#x8868;&#x8FBE;&#x5F0F;&#x6838;&#x5FC3;&#x53D8;&#x91CF;</p>
</li>
</ul>
<h3 class="mume-header" id="%E6%9F%A5%E7%9C%8B%E8%B0%83%E7%94%A8%E4%BF%A1%E6%81%AF">&#x67E5;&#x770B;&#x8C03;&#x7528;&#x4FE1;&#x606F;</h3>

<p>&#x5BF9;&#x4E8E;&#x5177;&#x4F53;&#x4E00;&#x4E2A;&#x65F6;&#x95F4;&#x7247;&#x7684;&#x4FE1;&#x606F;&#x800C;&#x8A00;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; -i &#x53C2;&#x6570;&#x540E;&#x8FB9;&#x8DDF;&#x7740;&#x5BF9;&#x5E94;&#x7684; INDEX &#x7F16;&#x53F7;&#x67E5;&#x770B;&#x5230;&#x4ED6;&#x7684;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#x3002;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>tt -i 1000
 INDEX          1000                                                            
 GMT-CREATE     2018-11-07 20:01:49                                             
 COST<span class="token punctuation">(</span>ms<span class="token punctuation">)</span>       9.752976                                                        
 OBJECT         0x7aadaf6b                                                      
 CLASS          qunar.tc.Test                                                   
 METHOD         query                                                  
 IS-RETURN      <span class="token boolean">true</span>                                                            
 IS-EXCEPTION   <span class="token boolean">false</span>                                                           
 PARAMETERS<span class="token punctuation">[</span>0<span class="token punctuation">]</span>  @String<span class="token punctuation">[</span>test<span class="token punctuation">]</span>                                      
 RETURN-OBJ     @EmptyList<span class="token punctuation">[</span>isEmpty<span class="token operator">=</span>true<span class="token punctuation">;</span>size<span class="token operator">=</span>0<span class="token punctuation">]</span>                                 
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 1 ms.
</pre><h3 class="mume-header" id="%E9%87%8D%E5%81%9A%E4%B8%80%E6%AC%A1%E8%B0%83%E7%94%A8">&#x91CD;&#x505A;&#x4E00;&#x6B21;&#x8C03;&#x7528;</h3>

<p>&#x5F53;&#x4F60;&#x7A0D;&#x7A0D;&#x505A;&#x4E86;&#x4E00;&#x4E9B;&#x8C03;&#x6574;&#x4E4B;&#x540E;&#xFF0C;&#x4F60;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x524D;&#x7AEF;&#x7CFB;&#x7EDF;&#x91CD;&#x65B0;&#x89E6;&#x53D1;&#x4E00;&#x6B21;&#x4F60;&#x7684;&#x8C03;&#x7528;&#xFF0C;&#x6B64;&#x65F6;&#x5F97;&#x6C42;&#x7237;&#x7237;&#x544A;&#x5976;&#x5976;&#x7684;&#x9700;&#x8981;&#x524D;&#x7AEF;&#x914D;&#x5408;&#x8054;&#x8C03;&#x7684;&#x540C;&#x5B66;&#x518D;&#x6B21;&#x53D1;&#x8D77;&#x4E00;&#x6B21;&#x8C03;&#x7528;&#x3002;&#x800C;&#x6709;&#x4E9B;&#x573A;&#x666F;&#x4E0B;&#xFF0C;&#x8FD9;&#x4E2A;&#x8C03;&#x7528;&#x4E0D;&#x662F;&#x8FD9;&#x4E48;&#x597D;&#x89E6;&#x53D1;&#x7684;&#x3002;</p>
<p>tt &#x547D;&#x4EE4;&#x7531;&#x4E8E;&#x4FDD;&#x5B58;&#x4E86;&#x5F53;&#x65F6;&#x8C03;&#x7528;&#x7684;&#x6240;&#x6709;&#x73B0;&#x573A;&#x4FE1;&#x606F;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x4E3B;&#x52A8;&#x5BF9;&#x4E00;&#x4E2A; INDEX &#x7F16;&#x53F7;&#x7684;&#x65F6;&#x95F4;&#x7247;&#x81EA;&#x4E3B;&#x53D1;&#x8D77;&#x4E00;&#x6B21;&#x8C03;&#x7528;&#xFF0C;&#x4ECE;&#x800C;&#x89E3;&#x653E;&#x4F60;&#x7684;&#x6C9F;&#x901A;&#x6210;&#x672C;&#x3002;&#x6B64;&#x65F6;&#x4F60;&#x9700;&#x8981; -p &#x53C2;&#x6570;&#x3002;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>tt -i 1000 -p
 RE-INDEX       1000                                                            
 GMT-REPLAY     2018-11-08 10:11:51                                             
 OBJECT         0x7aadaf6b                                                      
 CLASS          qunar.tc.Test      
 METHOD         query                                                  
 PARAMETERS<span class="token punctuation">[</span>0<span class="token punctuation">]</span>  @String<span class="token punctuation">[</span>test<span class="token punctuation">]</span>                                      
 IS-RETURN      <span class="token boolean">true</span>                                                            
 IS-EXCEPTION   <span class="token boolean">false</span>                                                           
 RETURN-OBJ     @EmptyList<span class="token punctuation">[</span>isEmpty<span class="token operator">=</span>true<span class="token punctuation">;</span>size<span class="token operator">=</span>0<span class="token punctuation">]</span>                                 
Time fragment<span class="token punctuation">[</span>1000<span class="token punctuation">]</span> successfully replayed.
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> 8 ms.
</pre><p>&#x8C03;&#x7528;&#x7684;&#x7ED3;&#x679C;&#x867D;&#x7136;&#x4E00;&#x6837;&#xFF0C;&#x4F46;&#x8C03;&#x7528;&#x7684;&#x8DEF;&#x5F84;&#x53D1;&#x751F;&#x4E86;&#x53D8;&#x5316;&#xFF0C;&#x7531;&#x539F;&#x6765;&#x7684;&#x7A0B;&#x5E8F;&#x53D1;&#x8D77;&#x53D8;&#x6210;&#x4E86; Bistoury &#x81EA;&#x5DF1;&#x7684;&#x5185;&#x90E8;&#x7EBF;&#x7A0B;&#x53D1;&#x8D77;&#x7684;&#x8C03;&#x7528;&#x4E86;&#x3002;</p>
<p><font color="red">&#x9700;&#x8981;&#x5F3A;&#x8C03;&#x7684;&#x70B9;</font></p>
<ul>
<li>
<p>ThreadLocal &#x4FE1;&#x606F;&#x4E22;&#x5931;
&#x5F88;&#x591A;&#x6846;&#x67B6;&#x5077;&#x5077;&#x7684;&#x5C06;&#x4E00;&#x4E9B;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x4FE1;&#x606F;&#x585E;&#x5230;&#x4E86;&#x53D1;&#x8D77;&#x8C03;&#x7528;&#x7EBF;&#x7A0B;&#x7684; ThreadLocal &#x4E2D;&#xFF0C;&#x7531;&#x4E8E;&#x8C03;&#x7528;&#x7EBF;&#x7A0B;&#x53D1;&#x751F;&#x4E86;&#x53D8;&#x5316;&#xFF0C;&#x8FD9;&#x4E9B; ThreadLocal &#x7EBF;&#x7A0B;&#x4FE1;&#x606F;&#x65E0;&#x6CD5;&#x901A;&#x8FC7; Arthas &#x4FDD;&#x5B58;&#xFF0C;&#x6240;&#x4EE5;&#x8FD9;&#x4E9B;&#x4FE1;&#x606F;&#x5C06;&#x4F1A;&#x4E22;&#x5931;&#x3002;</p>
</li>
<li>
<p>&#x5F15;&#x7528;&#x7684;&#x5BF9;&#x8C61;
&#x9700;&#x8981;&#x5F3A;&#x8C03;&#x7684;&#x662F;&#xFF0C;tt &#x547D;&#x4EE4;&#x662F;&#x5C06;&#x5F53;&#x524D;&#x73AF;&#x5883;&#x7684;&#x5BF9;&#x8C61;&#x5F15;&#x7528;&#x4FDD;&#x5B58;&#x8D77;&#x6765;&#xFF0C;&#x4F46;&#x4EC5;&#x4EC5;&#x4E5F;&#x53EA;&#x80FD;&#x4FDD;&#x5B58;&#x4E00;&#x4E2A;&#x5F15;&#x7528;&#x800C;&#x5DF2;&#x3002;&#x5982;&#x679C;&#x65B9;&#x6CD5;&#x5185;&#x90E8;&#x5BF9;&#x5165;&#x53C2;&#x8FDB;&#x884C;&#x4E86;&#x53D8;&#x66F4;&#xFF0C;&#x6216;&#x8005;&#x8FD4;&#x56DE;&#x7684;&#x5BF9;&#x8C61;&#x7ECF;&#x8FC7;&#x4E86;&#x540E;&#x7EED;&#x7684;&#x5904;&#x7406;&#xFF0C;&#x90A3;&#x4E48;&#x5728; tt &#x67E5;&#x770B;&#x7684;&#x65F6;&#x5019;&#x5C06;&#x65E0;&#x6CD5;&#x770B;&#x5230;&#x5F53;&#x65F6;&#x6700;&#x51C6;&#x786E;&#x7684;&#x503C;&#x3002;&#x8FD9;&#x4E5F;&#x662F;&#x4E3A;&#x4EC0;&#x4E48; watch &#x547D;&#x4EE4;&#x5B58;&#x5728;&#x7684;&#x610F;&#x4E49;&#x3002;</p>
</li>
</ul>
<h2 class="mume-header" id="options-1">options</h2>

<p>&#x5168;&#x5C40;&#x5F00;&#x5173;</p>
<table>
<thead>
<tr>
<th>&#x540D;&#x79F0;</th>
<th>&#x9ED8;&#x8BA4;&#x503C;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>unsafe</td>
<td>false</td>
<td>&#x662F;&#x5426;&#x652F;&#x6301;&#x5BF9;&#x7CFB;&#x7EDF;&#x7EA7;&#x522B;&#x7684;&#x7C7B;&#x8FDB;&#x884C;&#x589E;&#x5F3A;&#xFF0C;<font color="red">&#x6253;&#x5F00;&#x8BE5;&#x5F00;&#x5173;&#x53EF;&#x80FD;&#x5BFC;&#x81F4;&#x628A;JVM&#x641E;&#x6302;&#xFF0C;&#x8BF7;&#x614E;&#x91CD;&#x9009;&#x62E9;&#xFF01;</font></td>
</tr>
<tr>
<td>dump</td>
<td>false</td>
<td>&#x662F;&#x5426;&#x652F;&#x6301;&#x88AB;&#x589E;&#x5F3A;&#x4E86;&#x7684;&#x7C7B;dump&#x5230;&#x5916;&#x90E8;&#x6587;&#x4EF6;&#x4E2D;&#xFF0C;&#x5982;&#x679C;&#x6253;&#x5F00;&#x5F00;&#x5173;&#xFF0C;class&#x6587;&#x4EF6;&#x4F1A;&#x88AB;dump&#x5230;/${application dir}/arthas-class-dump/&#x76EE;&#x5F55;&#x4E0B;&#xFF0C;&#x5177;&#x4F53;&#x4F4D;&#x7F6E;&#x8BE6;&#x89C1;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;</td>
</tr>
<tr>
<td>batch-re-transform</td>
<td>true</td>
<td>&#x662F;&#x5426;&#x652F;&#x6301;&#x6279;&#x91CF;&#x5BF9;&#x5339;&#x914D;&#x5230;&#x7684;&#x7C7B;&#x6267;&#x884C;retransform&#x64CD;&#x4F5C;</td>
</tr>
<tr>
<td>json-format</td>
<td>false</td>
<td>&#x662F;&#x5426;&#x652F;&#x6301;json&#x5316;&#x7684;&#x8F93;&#x51FA;</td>
</tr>
<tr>
<td>disable-sub-class</td>
<td>false</td>
<td>&#x662F;&#x5426;&#x7981;&#x7528;&#x5B50;&#x7C7B;&#x5339;&#x914D;&#xFF0C;&#x9ED8;&#x8BA4;&#x5728;&#x5339;&#x914D;&#x76EE;&#x6807;&#x7C7B;&#x7684;&#x65F6;&#x5019;&#x4F1A;&#x9ED8;&#x8BA4;&#x5339;&#x914D;&#x5230;&#x5176;&#x5B50;&#x7C7B;&#xFF0C;&#x5982;&#x679C;&#x60F3;&#x7CBE;&#x786E;&#x5339;&#x914D;&#xFF0C;&#x53EF;&#x4EE5;&#x5173;&#x95ED;&#x6B64;&#x5F00;&#x5173;</td>
</tr>
<tr>
<td>debug-for-asm</td>
<td>false</td>
<td>&#x6253;&#x5370;ASM&#x76F8;&#x5173;&#x7684;&#x8C03;&#x8BD5;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td>save-result</td>
<td>false</td>
<td>&#x662F;&#x5426;&#x6253;&#x5F00;&#x6267;&#x884C;&#x7ED3;&#x679C;&#x5B58;&#x65E5;&#x5FD7;&#x529F;&#x80FD;&#xFF0C;&#x6253;&#x5F00;&#x4E4B;&#x540E;&#x6240;&#x6709;&#x547D;&#x4EE4;&#x7684;&#x8FD0;&#x884C;&#x7ED3;&#x679C;&#x90FD;&#x5C06;&#x4FDD;&#x5B58;&#x5230;/home/admin/logs/arthas/arthas.log&#x4E2D;</td>
</tr>
<tr>
<td>job-timeout</td>
<td>1d</td>
<td>&#x5F02;&#x6B65;&#x540E;&#x53F0;&#x4EFB;&#x52A1;&#x7684;&#x9ED8;&#x8BA4;&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#xFF0C;&#x8D85;&#x8FC7;&#x8FD9;&#x4E2A;&#x65F6;&#x95F4;&#xFF0C;&#x4EFB;&#x52A1;&#x81EA;&#x52A8;&#x505C;&#x6B62;&#xFF1B;&#x6BD4;&#x5982;&#x8BBE;&#x7F6E; 1d, 2h, 3m, 25s&#xFF0C;&#x5206;&#x522B;&#x4EE3;&#x8868;&#x5929;&#x3001;&#x5C0F;&#x65F6;&#x3001;&#x5206;&#x3001;&#x79D2;</td>
</tr>
</tbody>
</table>
<h3 class="mume-header" id="%E5%AE%9E%E4%BE%8B-26">&#x5B9E;&#x4F8B;</h3>

<p>&#x60F3;&#x6253;&#x5F00;&#x6267;&#x884C;&#x7ED3;&#x679C;&#x5B58;&#x65E5;&#x5FD7;&#x529F;&#x80FD;&#xFF0C;&#x8F93;&#x5165;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#x5373;&#x53EF;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>options save-result <span class="token boolean">true</span>
 NAME         BEFORE-VALUE  AFTER-VALUE                                         
----------------------------------------                                        
 save-result  <span class="token boolean">false</span>         <span class="token boolean">true</span>                                             
</pre><p>&#x67E5;&#x770B;&#x67D0;&#x4E2A;&#x5F00;&#x5173;&#x7684;&#x503C;&#xFF0C;&#x8F93;&#x5165;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#x5373;&#x53EF;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">root@local.example.com@bistoury:\<span class="token operator">&gt;</span>options save-result
options save-result
 LEVEL TYPE     NAME         VALUE  SUMMARY          DESCRIPTION                      
--------------------------------------------------------------------------------
 1     boolean  save-result  <span class="token boolean">false</span>  Option to print  This option enables to save each
                                    <span class="token function">command</span><span class="token string">&apos;s resu   command&apos;</span>s result to log file, w
                                    lt to log <span class="token function">file</span>   hich path is <span class="token variable">${user.home}</span>/logs/a
                                                     rthas-cache/result.log.     
</pre><h2 class="mume-header" id="stopshutdown">stop/shutdown</h2>

<p>&#x505C;&#x6B62;bistoury-agent attach &#x5230;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x90E8;&#x5206;</p>
<pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>stop
Bistoury Server is going to shut down<span class="token punctuation">..</span>.
</pre><pre data-role="codeBlock" data-info="shell" class="language-shell">admin@local@bistoury_demo_app:\<span class="token operator">&gt;</span>shutdown
Bistoury Server is going to shut down<span class="token punctuation">..</span>.
</pre><p>stop&#x548C;shutdown&#x6267;&#x884C;&#x6548;&#x679C;&#x5B8C;&#x5168;&#x4E00;&#x6837;</p>
<script type="application/javascript">
    $(document).ready(function () {
        $.ajax({
            url: "/version.do",
            success: function (version) {
                $("#version").html("（目前最新版本为" + version + "）");
            },
            error: function () {
                console.log("版本号查询失败")
            }
        });
        $.ajax({
            url: "api/release/info/path.do",
            success: function (ret) {
                if(ret.status==0){
                    $("#release_path").text(ret.data);
                } else {
                    console.log(ret.message)
                    $("#release_path").text("../webapps/releaseInfo.properties");
                }
            },
            error: function () {
                console.log("路径查询失败，使用默认路径")
                ("#release_path").text("../webapps/releaseInfo.properties");
            }
        });
    });
</script>
      </div>
      <div class="md-sidebar-toc"><ul>
<li><a href="#bistoury">Bistoury</a>
<ul>
<li><a href="#bistoury%E6%98%AF%E4%BB%80%E4%B9%88">Bistoury&#x662F;&#x4EC0;&#x4E48;&#xFF1F;</a></li>
<li><a href="#%E7%AE%80%E4%BB%8B">&#x7B80;&#x4ECB;</a></li>
<li><a href="#bistoury-%E8%83%BD%E5%81%9A%E4%BB%80%E4%B9%88">Bistoury &#x80FD;&#x505A;&#x4EC0;&#x4E48;&#xFF1F;</a></li>
</ul>
</li>
<li><a href="#%E5%AE%89%E8%A3%85">&#x5B89;&#x88C5;</a>
<ul>
<li><a href="#%E4%B8%8B%E8%BD%BD">&#x4E0B;&#x8F7D;</a></li>
<li><a href="#%E5%BA%94%E7%94%A8%E6%B3%A8%E5%86%8C">&#x5E94;&#x7528;&#x6CE8;&#x518C;</a></li>
<li><a href="#%E9%85%8D%E7%BD%AE">&#x914D;&#x7F6E;</a></li>
<li><a href="#%E5%90%AF%E5%8A%A8bistoury-agent">&#x542F;&#x52A8;bistoury agent</a></li>
</ul>
</li>
<li><a href="#%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8">&#x5FEB;&#x901F;&#x5165;&#x95E8;</a>
<ul>
<li><a href="#%E5%9F%BA%E7%A1%80%E5%91%BD%E4%BB%A4">&#x57FA;&#x7840;&#x547D;&#x4EE4;</a></li>
<li><a href="#jvm%E7%9B%B8%E5%85%B3">jvm&#x76F8;&#x5173;</a></li>
<li><a href="#classclassloader%E7%9B%B8%E5%85%B3">class/classloader&#x76F8;&#x5173;</a></li>
<li><a href="#monitorwatchtrace%E7%9B%B8%E5%85%B3">monitor/watch/trace&#x76F8;&#x5173;</a></li>
<li><a href="#options">options</a></li>
<li><a href="#web-console">Web Console</a></li>
</ul>
</li>
<li><a href="#%E5%91%BD%E4%BB%A4%E5%88%97%E8%A1%A8">&#x547D;&#x4EE4;&#x5217;&#x8868;</a>
<ul>
<li><a href="#ls">ls</a></li>
<li><a href="#cat">cat</a></li>
<li><a href="#pwd">pwd</a></li>
<li><a href="#history">history</a></li>
<li><a href="#tail">tail</a></li>
<li><a href="#zgrep">zgrep</a></li>
<li><a href="#dashboard">dashboard</a></li>
<li><a href="#jstack">jstack</a></li>
<li><a href="#jstat">jstat</a></li>
<li><a href="#thread">thread</a></li>
<li><a href="#jvm">jvm</a></li>
<li><a href="#mbean">mbean</a></li>
<li><a href="#sysprop">sysprop</a></li>
<li><a href="#sysenv">sysenv</a></li>
<li><a href="#vmoption">vmoption</a></li>
<li><a href="#ognl">ognl</a></li>
<li><a href="#getstatic">getstatic</a></li>
<li><a href="#heapdump">heapdump</a></li>
<li><a href="#logger">logger</a></li>
<li><a href="#qjdump">qjdump</a></li>
<li><a href="#qjtop">qjtop</a></li>
<li><a href="#qjmap">qjmap</a></li>
<li><a href="#qjmxcli">qjmxcli</a></li>
<li><a href="#sc">sc</a></li>
<li><a href="#sm">sm</a></li>
<li><a href="#dump">dump</a></li>
<li><a href="#redefine">redefine</a></li>
<li><a href="#mc">mc</a></li>
<li><a href="#jad">jad</a></li>
<li><a href="#classloader">classloader</a></li>
<li><a href="#monitor">monitor</a></li>
<li><a href="#watch">watch</a></li>
<li><a href="#trace">trace</a></li>
<li><a href="#stack">stack</a></li>
<li><a href="#tt">tt</a></li>
<li><a href="#options-1">options</a></li>
<li><a href="#stopshutdown">stop/shutdown</a></li>
</ul>
</li>
</ul>
</div>
      <a id="sidebar-toc-btn">&#x2261;</a>
    
    
    
    
    
    
    
    
<script>
document.body.setAttribute('html-show-sidebar-toc', true)
var sidebarTOCBtn = document.getElementById('sidebar-toc-btn')
sidebarTOCBtn.addEventListener('click', function(event) {
  event.stopPropagation()
  if (document.body.hasAttribute('html-show-sidebar-toc')) {
    document.body.removeAttribute('html-show-sidebar-toc')
  } else {
    document.body.setAttribute('html-show-sidebar-toc', true)
  }
})
</script>
      
  
    </body></html>